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 is serial version uid and its importance in java?
Explain about interthread communication and how it takes place in java?
Detail discussions on JVM, memory management and garbage collector.
Can a constructor be private and how are this() and super() method used with constructor?
What is use of functional interface in java 8? Explain
Can we override constructor?
When do we use synchronized blocks and advantages of using synchronized blocks?
What is an infinite loop?
What is the use of predicate in java 8?
Which way a developer should use for creating thread, i.e. Sub classing thread or implementing runnable.
Why is method overloading not possible by changing the return type in java?
Explain the importance of finally block in java?
Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?
Can a static class have a constructor java?
What is the difference between the file and randomaccessfile classes?