In the following code, what is the output for list2?
```
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 < list2.length; i++)
System.out.print(list2[i] + " ");
}
}```
a. 1 2 3
b. 1 1 1
c. 0 1 2
d. 0 1 3
c
You might also like to view...
Android is an open source operating system for personal computers and network servers
Indicate whether the statement is true or false
Find the error(s) in the following code, which uses variables to perform a calculation.
``` 1 int number1; 2 int number2; 3 int result; 4 5 number1 = (4 * 6 - 4) / (10 % 4 – 2); 6 number2 = (16 / 3) - 2 * 6 + 1; 7 result = number1 - number2; ```
Which system allows APs and other network equipment to be connected through the Internet and managed from one central location?
A. cloud management B. cooperative control C. WLAN array D. mesh network
The ____ page sets the look and tone of the website and contains a navigation structure that directs the viewer to the rest of the pages in the website.
A. home B. origin C. root D. key