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



Home Answers Viewqa Java-Beginners What modifiers are allowed for methods in an Interface?

Have Programming Question? Ask it here!
 
 
 


Java Coder
What modifiers are allowed for methods in an Interface?
1 Answer(s)      a year ago
Posted in : Java Beginners


Hi,

What modifiers are allowed for methods in an Interface?

thanks,


Advertisement
View Answers

April 16, 2013 at 12:34 PM


Hi friend,

Inside an interface defined constants are by default public static and final and the declared methods are public and abstract however, you may use these modifiers but if not used compiler will not generate the compilation error. So, for the method declaration the public and abstract modifiers are allowed.

For reading more about interface please go through the following link

roseindia.net/java/example/java/core/java-interface.shtml



Related Tutorials/Questions & Answers:
Advertisements
Advertisements
 

 

 

DMCA.com