In this lecture we are discussing types of interface:
#1
types of interface
1) Normal interface
2)functional interface /SAM
3)Marker interface
#2
i)Normal interface
Normal interface contains two or more abstract method.
It can have any number of static and default methods and also even public methods of Object classes.
you can declare variable which are public static final by deault
ii)Functional Interface:
Functional Interface is an interface that has only pure one abstract method.
It can have any number of static and default methods and also even public methods of Object classes
e.g Runnable interface : It contains only run() method
iii)
Marker Interface:
An interface that does not contain any methods, fields, Abstract Methods, and any Constants is Called a Marker interface.
Also, if an interface is empty, then it is known as Marker Interface.
The Serializable and the Cloneable interfaces are examples of Marker interfaces.