In the code below, why do line 3,4 print different things ?
int[] a = {1,2,3};
List<Integer> b = Arrays.asList(1,2,3);
System.out.println(Arrays.asList(a)); // prints the address
System.out.println(b); // prints the content
In the code below, why do line 3,4 print different things ?
int[] a = {1,2,3};
List<Integer> b = Arrays.asList(1,2,3);
System.out.println(Arrays.asList(a)); // prints the address
System.out.println(b); // prints the content