I'm looking for a way to print an Array List. I know I can use a loop but I do not want to use it. I'm looking for others way, I tried with println() and toString() but it does not return me the value of the Array List. See code below
int[] numbers = { 1, 4, 6, 7, 6, 2 }; System.out.println(Arrays.toString(numbers)); // print [1, 4, 6, 7, 6, 2] List<int[]> numbersList = Arrays.asList(numbers); System.out.println(numbersList); // print [[I@379619aa] System.out.println(numbersList.toString()); // print [[I@379619aa]