Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Can a method inside a Interface be declared as final?
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Java Coder
Can a method inside a Interface be declared as final?
1 Answer(s)      a year and 5 months 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: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
 

 

 

DMCA.com