Lambda
Facilitates functional programming. Method references
Optional Class
Optional is a container object which is used to represent a value is present or absent. Advantages: 1. Null checks are not required. 2. No more NPE at run-time 3. Encourages clean and neat APIs 4. No more Boiler plate code |
Streams
Stream represents a sequence of objects from a source, which supports aggregate functions. The concept of stream that lets the developer to process data declaratively, rather than having to write loops. |
Method ReferencesHelp to point to methods by their names. A method reference is described using :: symbol. A method reference can be used to point to the following types of methods: - Static methods - Instance methods - Constructors using new operator (TreeSet::new) Nashorn JavaScriptUsage:
Or, you can read it in using a FileReader() then call functions:
|
Cheatography
https://cheatography.com
Java 8 Cheat Sheet (DRAFT) by gnowakow
This is a draft cheat sheet. It is a work in progress and is not finished yet.