Types of interfaces in java

What you will learn here about interface types in java

  • Types of interfaces in java
    1. Marker interface
    2. Functional interface
    3. 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
    1. Serializable interface – It is used to convert object into byte stream.
    2. Cloneable interface – It is used to clone the object.
    3. 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.

INTERFACE IN JAVA

You may also like...