Notice
I wrote this article and was originally published on Qiita on 19 September 2019.
Array class is defined in JVM
public class ArrayClassClassloader {
public static void main(String[] args) {
System.out.println(boolean[].class.getClassLoader());
}
}
Output
null
This means that array class is load by bootstrap class loader
Name of array class
public class ArrayClassName {
public static void main(String[] args) {
System.out.println(boolean[].class.getName());
System.out.println(short[].class.getName());
System.out.println(int[].class.getName());
System.out.println(long[].class.getName());
System.out.println(float[].class.getName());
System.out.println(double[].class.getName());
System.out.println(char[].class.getName());
System.out.println(byte[].class.getName());
System.out.println();
System.out.println(java.lang.Integer[].class.getName());
System.out.println();
System.out.println(int[][].class.getName());
System.out.println(int[][][].class.getName());
System.out.println(int[][][][].class.getName());
}
}
Output
[Z
[S
[I
[J
[F
[D
[C
[B
[Ljava.lang.Integer;
[[I
[[[I
[[[[I