February 2014
Intermediate to advanced
160 pages
4h 59m
English
| | friends.stream() |
| | .map(String::toUpperCase); |
We can replace a lambda expression with a method reference if it directly routes the parameter as a target to a simple method call. The preceding sample code is equivalent to this:
| | friends.stream() |
| | .map(name -> name.toUpperCase()); |