Types of interfaces in java
What you will learn here about interface types in java
- Types of interfaces in java
- Marker interface
- Functional interface
- Normal interface
Marker interface in java
Marker interface in java is the empty interface. Marker interface does not have any method in it. There are 3 types of Marker interfaces and those are
- Types of Marker interface
- Serializable interface – It is used to convert object into byte stream.
- Cloneable interface – It is used to clone the object.
- Remote interface – It allows an object residing in one system to access or invoke an object running on another system.
Functional interface in java
Functional interface in java is the interface which has only one abstract method. Functional interface is also called as Single abstract method(SAM) interface. Runnable , Comparable are the example of Functional interface.
Normal interface in java
Normal interface in java is the interface which has more than one abstract method. if you want to more detail about interface then please visit the following link.