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


Please Help Members By Posting Answers For Below Questions

Give me an example of array and linked list? Where they can be used?

780


Are private methods final?

668


What is a numeric digit?

791


How to create a fecelet view?

784


What are the basic concepts of OOPS in java?

774


How to perform merge sort in java?

815


Can inner class extend any class?

817


How do you bind variables?

786


I am a fresher and know core java, c languge, html, css etc if I am illegible for any job then send it on my email tatranakshay276@gmail.com

1378


What are the Main functions of Java?

859


Difference between default and protected access specifiers?

752


What is method reference?

736


How does arraylist size increase in java?

791


What is generics in java interview questions?

788


What is object of class in java?

853