Analyze the following code:
public class Test {
public static void main(String[] args) {
int[] x = {1, 2, 3, 4};
int[] y = x;
x = new int[2];
for (int i = 0; i < y.length; i++)
System.out.print(y[i] + " ");
}
}
发布于 2021-02-15 03:24:35
【单选题】 A The program displays 1 2 3 4 B The program displays 0 0 C The program displays 0 0 3 4 D The program displays 0 0 0 0