4 ms·In modern Java(8) it is now asList("hat", "dog", "cat").forEach(System.out::println)by benjiweber 12y agoIn modern Java(8) it is now asList("hat", "dog", "cat").forEach(System.out::println)