What is marker interface?

Technology: java core java
AskedIn:
Topics: interface
Type: theory
  • An interface which neither have any methods nor any constants is a marker interface
  • It provides run time type information about objects so that compiler/JVM can take some action based on the information received
  • they are used to convey a message to the JVM that the class implementing this type of interface has some extra functionality
  • e.g. Cloneable, Serializable, Remote Interface