java.util.Arrays is NOT the class which defines the
java language arrays. There is no predefined class in the JDK for them, a class is created for an array at the runtime, depending on the type of members ( getClass() for an array of ints would print [I.. its superclass wud be Object )
an arrays class is the same as the following class:
class A implements Cloneable, java.io.Serializable {
public final int length = X;
public Object clone()
{
try
{
return super.clone();
}
catch (CloneNotSupportedException e)
{
throw new InternalError(e.getMessage()); }
}
}
---
so it has to implement clone() method in order to implement the Clonable interface, although it eventually calls Object's clone() .
cheers,
Vivek