Are there any other ‘marker’ interfaces?
The marker interface pattern is a design pattern in computer science, used with languages that provide run-time type information about objects. It provides a means to associate metadata with a class where the language does not have explicit support for such metadata.
A marker interface in Java is an interface with no fields or methods. Simply, It is an empty interface in Java is called a marker interface.
Examples of marker interfaces are the Serializable , Cloneable and Remote interfaces.
These are used to indicate some information to compilers or JVMs.
Recent Comments