Types of Interface
Functional interface: A interface that has only one abstract method. It may have other static and default methods. you can leave the name while implementing the name of the method because an interface contains only one abstract method.
Marker interface: A interface without any method. This is to add on some special functionality to the class so the compiler can treat that class in different ways.
Generic interface: A interface that is general like a class and has variables, methods, and constructors.
No comments:
Post a Comment