You can cast a primitive array reference only to and from an Object or Cloneable reference. : Array Type Casting « Type Casting « SCJP






Converting and casting primitive array elements follow the same rules 
as converting and casting simple primitive variables. 

public class MainClass {
  public static void main(String[] argv) {
    int sizes[] = { 4, 6, 8, 10, 14, 20 };
    Object obj = sizes;
    int x = ((int[]) obj)[2];

  }
}








4.4.Array Type Casting
4.4.1.An array may be converted to interface Cloneable
4.4.2.An array may be converted to the interface Serializable
4.4.3.An array may be converted to another array. (element type must be convertible)
4.4.4.Converting byte array to int array
4.4.5.Array casting
4.4.6.If the object is an array type, you can cast it to the Cloneable interface.
4.4.7.An object array can be cast to an parent class array type
4.4.8.You can cast a primitive array reference only to and from an Object or Cloneable reference.
4.4.9.Manipulate a reference to an array of Extend references