for each java 9 code example Example: inline foreach java names.forEach(name -> System.out.println(name));