February 2014
Intermediate to advanced
160 pages
4h 59m
English
| | str.chars() |
| | .forEach(System.out::println); |
We can replace a lambda expression with a method reference if it directly routes the parameter as an argument to a method on another instance; for example, println on System.out. The preceding sample code is equivalent to this:
| | str.chars() |
| | .forEach(ch -> System.out.println(ch)); |