What is wrong in the following code?
1 public class Test {
2 public static void main(String[] args) {
3 Integer[] list1 = {12, 24, 55, 1};
4 Double[] list2 = {12.4, 24.0, 55.2, 1.0};
5 int[] list3 = {1, 2, 3};
6 printArray(list1);
7 printArray(list2);
8 printArray(list3);
9 }
10
11 public static void printArray(Object[] list) {
12 for (Object o: list)
13 System.out.print(o + " ");
14 System.out.println();
15 }
16 }
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.