Logo F2FInterview

Java Interview Questions

Q   |   QA

An Interface which doesn't have any declaration inside but still enforces a mechanism.

Polymorphism.

Yes it's possible. This is basically to avoid instance creation of the class.

No not possible. Class C should provide implementation for all the methods in the Interface I. Since Class C didn't provide implementation for m1 method, it has to be declared as abstract. Abstract classes can't be instantiated.

No not possible. Doing so will result in compilation error. public and abstract are the only applicable modifiers for method declaration in an interface.

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: