Marker interface plays vital role even though it doesn't contain any methods.The main purpose is to identify the special objects from normal objects for example if you want to serialize an object then how you will inform to the JVM to serialize the particular object because there may be so many objects available in JVM. In order to know which object is to be serialized marker interfaces are used. When you implement a marker interface the object will be tagged with boolean property with that property JVM knows which object should be serialized and which object should not be serialized.
Java defines these(Tagging or Marker ) interfaces that are just used as a boolea property of a class,But doesn't actually require the implementation of any methods.
These interfaces are called Tagging or Marking Interfaces.
Thank you.
These interfaces are called Tagging or Marking Interfaces.
Thank you.
Market interfaces are just used to tell the the JVM that, just do specific things which is jvm specific for the objects which implements those interfaces.
Means all the objects which implements marker interface, only jvm is responsible to do the specific functionality.
Means all the objects which implements marker interface, only jvm is responsible to do the specific functionality.