What modifiers are allowed for methods in an Interface?

What modifiers are allowed for methods in an Interface?

Hi,

What modifiers are allowed for methods in an Interface?

thanks,

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:
What modifiers are allowed for methods in an Interface?
Modifiers are allowed in interface
Advertisements
Java modifiers
What are the data types allowed in a table?
What are Callback interfaces?
What are the Core interfaces are of Hibernate framework?
what is the difference between access specifiers and access modifiers in java?
What are Classes and Interfaces in Java?
What are weak methods?
interfaces
Access Modifiers
The ActionForm and what are important methods in ActionForm.
what is class methods in objective c
what is class methods in objective c
What are the methods in Object? - Java Beginners
Identify the interfaces and methods a CMP entity bean must and must not implement.
Java modifiers
What are the most common methods of Hibernate configuration?
Java modifiers
Identify the interfaces and methods a JMS message-driven bean must implement.
What are the different types of interfaces in java? - Java Interview Questions
Access Specifiers and Access Modifiers
What's the proper way to test a class with private methods using JUnit?
methods
methods
methods
EJB Interfaces
Access Modifiers in java
Why is super.super.method(); not allowed in Java?
Nonaccess Member Modifiers - Java Beginners
Access Modifier
Java access modifiers
access specifiers and access modifiers
Explain various access modifiers and their visibility.
Methods of HttpServlet
ModuleNotFoundError: No module named 'access-modifiers'
Interfaces in flex
EJB Interfaces
Interfaces - Java Interview Questions
ModuleNotFoundError: No module named 'odoo10-addon-purchase-allowed-product'
ModuleNotFoundError: No module named 'odoo11-addon-purchase-allowed-product'
java interfaces implementation
Hibernate Callback interfaces
Marker interfaces in java
Java interfaces
Hibernate: core interfaces of hibernate framework
Interfaces - Java Interview Questions
Various methods of httpservletresponse interface
ModuleNotFoundError: No module named 'interfaces'
Interfaces and Abstract Classes - Development process

Ads