How come
int alone; System.out.println(alone);
Gives errors but
int[] arr = new int[1]; System.out.println(arr[0]);
Yes, for primitive type number arrays, it initializes with 0, for boolean[], it initializes with false, for char[], it initializes with NULL(ASCII value 0) and for objects [] including String[] its initializes with null.
number arrays
0
boolean[]
false
char[]
NULL(ASCII value 0)
objects [] including String[]
null