In the following code, what is the output for list1?
```
public class Test {
public static void main(String[] args) {
int[] list1 = {1, 2, 3};
int[] list2 = {1, 2, 3};
list2 = list1;
list1[0] = 0; list1[1] = 1; list2[2] = 2;
for (int i = 0; i < list1.length; i++)
System.out.print(list1[i] + " ");
}
}
```
a. 1 2 3
b. 1 1 1
c. 0 1 2
d. 0 1 3
c. 0 1 2
Computer Science & Information Technology
You might also like to view...
Certain ________ are available for certain table events
A) Before events B) After events C) Data actions D) Data blocks
Computer Science & Information Technology
________ may not appear on your screen, but may on another user's screen depending on the screen resolution and size
Fill in the blank(s) with correct word
Computer Science & Information Technology