0Pricing
Java Academy · Lesson

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

  1. Lambda Syntax & Scope
  2. Functional Interfaces
  3. Method References & Optional
← Back to Java Academy