Question 7
Back to Exercise
After int[] b = a;, what is true?
- A b is an independent copy
- B a and b refer to the same array; changing b[0] changes a[0] Correct
- C b is empty
- D It does not compile
Correct Answer: Option B
Use a.clone() for a separate copy.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!