Array is object

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

Recommended Posts

Array is object
What is object orientation?
Maybe this is object oriented
Array
Array
Is String # format (String, Object ...) really slow?
[Technical Note] What is Object Oriented?
Explanation about Array object of Ruby
What is a Ruby 2D array?
[Java] array
[Ruby] Array
Java array
Array practice
Java array
java (array)
Java array
[Java] Array
10⁹⁹⁴²⁰⁶⁷ is 8 digits
Array practice 2
Java array
12 of Array
java array
[Java] Array
Which is faster, Array # sample or Random # rand?