int[] a = new int[4];
System.out.println(a[0] + " " + a[3]);What is printed?
- A
null null
- Bcheck_circle
0 0
- C
ArrayIndexOutOfBoundsException
- D
1 1
Explanation
new int[4] creates an int array of length 4 with default values. The default for int is 0, so all elements start as 0.