What would be the result of compiling and running the following program?.
// Filename: Main.java class Main {//from w w w . ja v a 2 s . c om public static void main(String[] args) { int size = 20; int[] arr = new int[ size ]; for (int i = 0; i < size; ++i) { System.out.println(arr[i]); } } }
Select the one correct answer.
(e)
The array declaration is valid, and will declare and initialize an array of length 20 containing int values.
All the values of the array are initialized to their default value of 0.
The for(;;) loop will print all the values in the array, that is, it will print 0 twenty times.