I see that new Arrays
are always initialised with default values. For example, an int array will have all its elements initialised as 0
initially. For example:
int myArray = new int[7];
System.out.println(myArray[3]); // 0
I wanted to ask how arrays of other types (primitives & non-primitives) are initialised and what values do their elements hold initially?