March 2019
Intermediate to advanced
242 pages
6h 21m
English
Java, version 8, introduced functional programming, with lambda functions. The lambda expression can infer the type of its formal parameters. Consider the following code:
Consumer<String> consumer = (String s) -> System.out.println(s);
Instead of the preceding code, you could type the following code:
Consumer<String> consumer = s -> System.out.print(s);
Read now
Unlock full access