Optionals are a language concept that have been introduced in Java 8.
A story of why optionals have been introduced can be found here
Optionals are represented by the Optional class in the java.util package and it is used to represent if a value is present or absent.
The main advantage of this new construct is that it can avoid too many null checks and it avoids any runtime NullPointerExceptions.
Optionals also support us in developing clean APIs, as they express intent that a value might be absent.