What will be the output of the following program?
int[] arr = {10, 20, 30, 40, 50};
for (int i : arr) {
System.out.print(i + " ");
}
10 20 30 40 50
0 0 0 0 0
Compilation Error
10 10 10 10 10
This question is part of this quiz :
Java Arrays