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
How does system arraycopy work in java?
What is functional interface in java example?
Explain runtime exceptions?
What is indexof in java?
What is hash table in java?
Why is method overloading not possible by changing the return type in java?
Is java jre still free?
What are advantages of exception handling in java?
Is null keyword in java?
Can set contain duplicates?
What is classes in java?
What is the importance of static variable?
Mention some features of java?
Is it possible to override private or static method in java?
These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }