The java.lang.object class is the super / parent class of all java classes, if you want to create an object in java, then it must implement the java.lang.object class. If you do not import the class superclass into your code, then the compiler will implicitly import it into your code. SO automatically all its properties and behavior are available to you - an object (program), including the clone () method, if you call the clone () method in your program, which means that the clone () method is called from the superclass (class Object), and not from a child class.
Marker Interfaces: Its true Marker interfaces are an empty interface that does not contain properties and behavior. Now the question can be raised.
Q. Who will implement the predefined marker interface, if used in our program?
The answer . The JVM will assume this responsibility because the functionality of the marker interface is defined inside the JVM, so it implements and adds some additional functions for you - this is a program.
Therefore, the programmer does not need to implement the Clonable Marker interface, the JVM will assume this responsibility.
source share