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