Optional is a container object that may have a null or non-null value. If it has a value then isPresent() method returns true.
It a value is present, we can call get() method to get the value. Else we will get nothing.
It is very useful in handling data that has null values.Read the full book at www.amazon.com