“Life always begins with one step outside of your comfort zone.”
― Shannon L. Alder
1. Introduction
Java version 1.8 provides the new class Optional which represents an abstration of an optional value. That is the object may contain a value or a null
. This class provides several useful features which help java programmers avoid NullPointerException. Let us look into this class in more detail.