<code>int[] a = {1,2,3}; int[] b = a; b[0] = 99;</code> — what is a[0]?
- A
Throws exception
- Bcheck_circle
99
- C
0
- D
1
Explanation
<code>b = a</code> copies reference; both point to same array.
AP Computer Science A· difficulty 3/5
<code>int[] a = {1,2,3}; int[] b = a; b[0] = 99;</code> — what is a[0]?
Throws exception
99
0
1
Explanation
<code>b = a</code> copies reference; both point to same array.
Want 10 more like this — adaptive to your weak spots?