List<String> strings = new ArrayList<>(); strings.stream().forEach((string) -> { System.out.println("Content: " + string); });

With the "functional looping style" any pre- or post-processing like filtering, grouping or even parallelization can be easily achieved:

strings.parallelStream(). filter(s -> s.contains("java")). forEach((string) -> { System.out.println("Content: " + string); }); }

NetBeans 8 converts ordinary for-loops into the functional notation by hitting the ALT+ENTER key on, or by clicking on the yellow bulb.