The basic Properties of Interface


1. Interface must be declared with the key word ‘interface’.

2. All interface methods are implicitly public and abstract. In another words you dont need to atually type the public or abstract modifiers in the metod declaration, but method is still allways public and abstract.

3. All variables defined in an interface is public, static, and final. In another words, interfaces can declare only constants , not instance variables.

4. Interface methods must not be static.

5. Because interface methods are abstract, they cannot be marked final, strictfp, or native.

6. An interfaces can extend one or more other interfaces.

7. An interface cannot implement another interface or class.

8. interface types can be used polymorphically.

2 thoughts on “The basic Properties of Interface

  1. Anurag Singh's avatar Anurag Singh March 30, 2018 / 7:48 am

    Thanks for this useful explanation. It is really helpful.

Leave a reply to Anurag Singh Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.