Hi can u pls tell me what is the use of marker interface.
Iknow what is marker interface but what ability will the
object get by implementing this.
Answer Posted / guest
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.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What is the right data type to represent a price in java?
What are the advantages of arraylist over arrays?
What are methods?
Explain some best practices you would apply while using collection in java?
How do you override a variable in java?
What is consumer in java?
Write code of any action class?
What are 3 data types?
What are the methods of object class ?
Differences between traditional programming language and object oriented programming language?
What is Enum in Java?
What do you understand by java?
How much is a java license?
Can you achieve runtime polymorphism by data members?
What does method mean?