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.
No comments:
Post a Comment