Java Optional Guide

If you are not a paid Medium member you can read it here.

1. What is the purpose of Optional Class?

If you have been into coding for a while, you should have encountered Null Pointer Exception before. If you try to use a reference type that doesn’t point anything in the memory, you get NullPointerException. This sentence may be complicated, see the example below:

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store