What is an interface class?- An interface class is an abstract class with public abstract methods.
- You can inherit the class and have the methods overridden.
- It is an abstract class with public abstract methods with no implementation.
- It contains any number of methods.
- It is written in a file with a .java extension, with the name of the interface matching the name of the file.
- You cannot instantiate an interface.
- It can extend multiple interfaces.
- The 'interface' keyword is used to declare an interface.
- A class uses the 'implements' keyword to implement an interface.
- The 'extends' keyword is used to extend an interface and the child interface inherits the methods of the parent interface.
|