Check out example codes for "how to print each element of an arraylist on a new line in java". It will help you in understanding the concepts better.

Code Example 1

for (String element : list) {
    System.out.println(element);
}

Code Example 2

list.forEach(t -> System.out.println(t));

Code Example 3

list.forEach(System.out::println);

Learn ReactJs, React Native from akashmittal.com