0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Array is object

Posted at

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
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?