loop that will print out each element of an ArrayList on a new line code example
Example 1: how to print each element of an arraylist on a new line in java
list.forEach(System.out::println);
Example 2: how to print each element of an arraylist on a new line in java
list.forEach(t -> System.out.println(t));