10.8 Class Objects for Arrays

Every array has an associated Class object, shared with all other arrays with the same component type. The superclass of an array type is considered to be Object, as shown by the following example code:


class Test {
	public static void main(String[] args) {
		int[] ia = new int[3];
		System.out.println(ia.getClass());
		System.out.println(ia.getClass().getSuperclass());
	}
}

which prints:


class [I
class java.lang.Object

where the string "[I" is the run-time type signature for the class object "array with component type int" (§20.1.1).