posted 17 years ago
As you said, it is in Object so there is a basic implementation. This will copy all fields for you. This is protected so you can't just try to clone() every single object, not expecting the CloneNotSupportedException.
Now I too have asked myself why Cloneable does not declare the clone() method, but the reason is quite clear: it requires the clone() method to become public. However, sometimes you want to use clone() internally only, so you want it to remain protected. If Cloneable would declare clone() that would not be allowed.
Now the Cloneable interface does have a reason: just like Serializable, it is a marker class that the JVM will use internally. Without implementing Serializable, you cannot write the object to ObjectOutputStreams. Without implementing Cloneable, you cannot clone the object.