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
How is string stored in java?
How big is a 32 bit integer?
Write a java program to check if a number is prime or not?
Is there any case when finally will not be executed?
What are packages in java?
What is stringwriter?
Describe string intern() methodology
what do you understand by the term string with respect to java?
What does index mean in java?
What are different types of encoding?
what is anonymous class in java?
Can an integer be a string?
What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?
Explain the usage of this with constructors?
What is parseint?