Java Coder
Can a method inside a Interface be declared as final?
1 Answer(s)      2 years and a month ago
Posted in : Java Beginners

Hi,

Can a method inside a Interface be declared as final?

Thanks,

Advertisement
View Answers

April 15, 2013 at 11:46 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