List myList = new ArrayList(); myList.add("A"); myList.add("B"); myList.add("C"); myList.forEach(System.out::println);