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 :)
Markdown for AI
A clean, structured version of this page for AI assistants and LLMs.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Can you answer this question?
Write Answer1 Answers