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
Can you override private or static method in java?
What is the right data type to represent a price in java?
Is string is a data type in java?
What are the java ide’s?
What is used of static keyword in java?
How does queue work in java?
Define inheritance with reference to java.
what is optional in java 8?
How will you serialize a singleton class without violating singleton pattern?
What is an object's lock and which object's have locks in java programming?
What is java command?
What was java originally called?
What are the differences between include directive and include action?
Can java run on google chrome?
What is the purpose of skeleton and stub?