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
Can we print null in java?
What is definition and declaration?
What are the different approaches to implement a function to generate a random number?
Can an object be null?
What is the purpose of extern variable?
What is the difference between JVM and JRE?
Can we override constructor in java?
What is treeset and treemap in java?
How to use arraylist in java netbeans?
How to perform merge sort in java?
What state does a thread enter when it terminates its processing in java programming?
What is string in java? String is a data type?
What is an image buffer?
Is it safe to install java on my computer?
What is the purpose of void class?