Java Guild Meeting 5/2018

Gi11i4m
73.6K views

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Summary

Optionals is a concept that brings new advantages:

  • Use of type system to avoid runtime NullPointerException
  • Intention revealing APIs
  • Works nicely with Streams

But every new concept brings new responsibilities.

More optionals in Java 9+:

  • The or() method
  • The ifPresentOrElse() method
  • The stream() method
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content