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 are actual parameters?
What is the public field modifier?
How to split arraylist elements in java?
Why java is a platform independent? Explain
How does a for loop work?
Why for each loop is used?
What happens to the Exception object after handling an exception?
What are drawbacks of singleton class?
What are the different http methods?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. Define how can I do so?
Explain hashset and its features?
What is a qualifier in a sentence?
What is the difference between synchronized and synchronized block?
What is the Concept of Encapsulation in OOPS
What is arrays aslist in java?