Question PRG-JAVA-0062
HardWhat is the output of this program?
public class Main {
public static void main(String[] args) {
int[] a = {1, 2, 3};
int[] b = a.clone();
b[0] = 9;
int[][] m = {{1, 2}, {3, 4}};
int[][] n = m.clone();
n[0][0] = 9;
System.out.println(a[0] + " " + m[0][0]);
}
}
- A.
1 9
- B.
1 1
- C.
Sign up free to see the answer and a step-by-step explanation.