Method References & Optional
Learn Java method references and the Optional class.
Intro
Method references are a shorthand for lambdas that call an existing method. Optional helps handle missing values safely.
Syntax
Syntax: ClassName::methodName or object::methodName. It replaces a lambda that just calls that method.
All lessons in this course
- Lambda Syntax & Scope
- Functional Interfaces
- Method References & Optional