The marker interface in Java is an interfaces with no field or methods. In other words, it an empty interface in java is called a marker interface. An example of a marker interface is a Serializable
, Clonable
and Remote
interface.
Marker interface is used as a tag to inform a message to the java compiler so that it can add special behaviour to the class implementing it.