下面这段代码的正确输出结果是( )。 public static void main(String[] args) { int[] beforeArray = { 1, 2, 3, 4, 5, 6, 7 }; int[] afterArray; afterArray = beforeArray; afterArray[3] = 3; System.out.println("After Modifying:"); for (int i = 0; i < beforeArray.length; i++) { System.out.print("a[" + i + "]=" + beforeArray[i] + ","); } }
A.
a[0]=1,a[1]=2,a[2]=3,a[3]=3,a[4]=5,a[5]=6,a[6]=7,
B.
a[0]=1,a[1]=2,a[2]=3,a[3]=4,a[4]=5,a[5]=6,a[6]=7,
C.
a[0]=1,a[1]=2,a[2]=4,a[3]=3,a[4]=5,a[5]=6,a[6]=7,
D.
a[0]=1,a[1]=2,a[2]=4,a[3]=4,a[4]=5,a[5]=6,a[6]=7,