Here is the quote from Effective Java:
Here it is, copied from the specification for java.lang.Object [JavaSE6]:
Creates and returns a copy of this object. The precise meaning of “copy” may depend on the class of the object. The general intent is that, for any object x, the expression
x.clone() != xwill be true, and the expression
x.clone().getClass() == x.getClass()will be true, but these are not absolute requirements. While it is typically the case that
x.clone().equals(x)will be true, this is not an absolute requirement. Copying an object will typically entail creating a new instance of its class, but it may require copying of internal data structures as well. No constructors are called.
Now let's look at the JavaSE6 javadocs
Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object x, the expression:
x.clone() != x will be true,and that the expression:
x.clone().getClass() == x.getClass()will be true, but these are not absolute requirements. While it is typically the case that:
x.clone().equals(x)will be true, this is not an absolute requirement.
Where did he find the emphasized text? What's the requirement?