What is Marker interface in java? and what is clone?

Answer Posted / kavya

Use of marker interface in java

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. How it’d do the 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

Can we print null in java?

574


What is definition and declaration?

526


What are the different approaches to implement a function to generate a random number?

571


Can an object be null?

551


What is the purpose of extern variable?

538






What is the difference between JVM and JRE?

622


Can we override constructor in java?

579


What is treeset and treemap in java?

582


How to use arraylist in java netbeans?

512


How to perform merge sort in java?

583


What state does a thread enter when it terminates its processing in java programming?

578


What is string in java? String is a data type?

580


What is an image buffer?

537


Is it safe to install java on my computer?

542


What is the purpose of void class?

608