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