Analyze the following code:
public class Test {
public static void main(String[] args) {
| final int[] x = {1, 2, 3, 4}; |
| for (int i = 0; i < y.length; i++) |
| System.out.print(y[i] + " "); |
}
}
◦ The elements in the array x cannot be changed, because x is final.
◦ The program has a compile error on the statement x = new int[2], because x is final and cannot be changed.
◦ The program displays 1 2 3 4
◦ The program displays 0 0