cara mencetak setiap elemen arraylist pada baris baru di java
list.forEach(System.out::println);
Doubtful Dog
list.forEach(System.out::println);
list.forEach(t -> System.out.println(t));
for (String element : list) {
System.out.println(element);
}