It means we giving some extra functionality to the our class by extending than create a marker interface. Functionality will be different from marker interface to per interface .If JVM finds any user defined class was implemented any marker interface it will do some special operation on that object.
In java we have the following main marker interfaces as shown below:
1)Searilizable interface
2)Cloneable interface
3)Remote interface
4)ThreadSafe interface
Object x = "mindstick"; if (x instanceof Serializable) { }
writeObject(Serializable);
Happy Coding :)
Liked By
Write Answer
Marker interface in Java ?
Join MindStick Community
You have need login or register for voting of answers or question.
Prakash nidhi Verma
11-Jun-2018