What is Marker interface in java? and what is clone?
Answer Posted / ajay tiwari
Marker interfaces are those interface which may contain any
method but they provide some special information to the JVM
about what type of class or object it can be.
EX. Cloneable is a marker interface with no method which
means but it provide information to the JVM that class's
object who implement it can be cloned.
Runnable is also a marker interface with a run() method
which provide the information to the JVM that class's
object which implement this is used as a thread.
while the collection interface doesn't provide any special
information to the JVM that's why it is not as a Marker
interface
Is This Answer Correct ? | 33 Yes | 7 No |
Post New Answer View All Answers
What modifiers are allowed for methods in an interface?
What is functional interface in java example?
what is the swingutilities.invokelater(runnable) method for? : Java thread
What is the scope or life time of instance variables?
What is oop in java?
What is a JAR file?
What data type is true or false?
What is a nested class?
What are the differences between the constructors and methods?
Explain about anonymous inner classes in java?
How to use Media tracker Class.
What is difference between this and super keyword?
What happens when a thread cannot acquire a lock on an object in java programming?
Is node a data type in java?
What is a string token?