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 nested try statements in java?

862


How many bits are in a sentence?

812


How do listeners work?

766


What is the difference between actual and formal parameters?

721


What purpose do the keywords final, finally, and finalize fulfill?

878


Write a program to find the greatest of three numbers in java?

785


What is the purpose of finalization in java programming?

805


Is java good for beginners?

769


What is java regex?

753


How do you include a string in java?

763


What is the difference between error and an exception?

790


What is the flag in java?

804


What is the main purpose of serialization in java?

796


What is application tier?

800


Explain the use of sublass in a java program?

782