What is Marker interface in java? and what is clone?
Answer Posted / kavya
It’s a kind of interface which has no method is known as marker interface. Serializable, Clonnable is the example of marker interface to create <a href="http://beyondcorner.com/create-own-marker-interface-in-java">Marker Interface in Java </a>
Use of Marker Interface:
Marker Interfaces are used to indicate something to compiler/JVM. If JVM see that a class is a object of Marker Interface then it will perform some special operation. Take an example with Serializable, Clonnable marker interface, if JVM see a Class is Serialized/Clonnable then It will do some special operation on it, similar way if JVM sees one Class is implemented custom marker interface which is created by ourself then the JVM do some special operation.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of return statement?
Which graphs are functions?
What is the difference between superclass and subclass?
Can you pass functions in java?
What is lazy programming?
Explain how hashmap works?
Where are the card layouts used?
What is regex java?
What is ascii format?
Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain
What are the disadvantages of using inner classes?
Define inheritance?
What is multithreading in java?
What’s meant by anonymous class?
What is math floor in java?