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 anonymous inner class?
What is the maximum length of a url?
What are the two categories of data types in the java programming language?
What is nextline method in java?
What is arrays aslist in java?
why would you use a synchronized block vs. Synchronized method? : Java thread
Can we override protected method in java?
How does java enable high performance?
how are methods defined?
What are variable arguments or varargs?
Explain the differences between abstraction and encapsulation?
How can you avoid serialization in child class if the base class is implementing the serializable interface?
How to pass arraylist to stored procedure in java?
Can you give names of Container classes?
What are the different conditional statements?