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.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sudheer
The interfaces with no defined methods act like markers. They just tell the compiler that the objects of the classes
implementing the interfaces with no defined methods need to be treated differently.
Example Serializable, clonable etc.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / sowmya sreenivasan
Marker Interface is also called Tagging interface which are used as a boolean property of a class but actually doesnt require implementation of any methods.
eg:java.io.serializable interface.
The objects of the class implementing this interface are serializable objects.
| Is This Answer Correct ? | 0 Yes | 0 No |
How do you remove spaces in java?
if two references are having same hash codes,is that means those are refering to same object?
What about method local inner classes or local inner classes in java?
Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?
What are actual parameters?
Can you explain the cs option of java interpreter?
Can a class be private in java?
can we have function for truncating the sign as like abs in oracle.
Name the types of 'priority'?
What is JFC?
Can we make constructors static?
program to find 25 square = 625 here the 625 of last two digits is equal to 25, i don't know excatly what this type of number is called