February 2014
Intermediate to advanced
160 pages
4h 59m
English
| | friends.forEach(name -> System.out.println(name)); |
The parentheses () around the parameter are optional if the lambda expression takes only one parameter and its type is inferred. We could write name -> ... or (name) -> ...; lean toward the first since it’s less noisy.