Marker interface doesn\'t has any thing. It contains only interface declarations, then how it is handled by the JVM for the classes which implements this marker interface?
The marker interface helps identify that whether the object under inspection is actually a type (implemented interface) we are interested in. However it is not different than the other interfaces (except that they don't have any behavior obligation)
For example, the ObjectOutputStream
can find that if a class implements Serializable
, then the user has explicitly shown his consent that the object can be serialized.