Can a method inside a Interface be declared as final?

Hi,

Can a method inside a Interface be declared as final?

Thanks,

View Answers

April 15, 2013 at 11:41 AM

Hi friend,

No, we can't declare a final method inside the interface. Doing so, the Java compiler will give the compilation error. This is because the methods declared inside the interface must have to implemented by its implementing class. Inside the interface only public and abstract modifier is allowed for declaring a method.

For more detail you can go through the following link

http://www.roseindia.net/java/master-java/interface.shtml









Related Tutorials/Questions & Answers:
Advertisements