In the following code, what is the printout for list2? 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

Solved
Show answers

Ask an AI advisor a question