To Overcome NullPointerException
The Java 8’s
Optional is meant for alleviating the occurrence of
NullPointerException is the result of Null References, Null Reference is also known as The Billion Dollar Mistake.
The Billion Dollar mistake was coined by a British computer scientist,
Sir Charles Antony Richard Hoare.
Null pointers are the single biggest source of bugs in programs. Without them, all of the time wasted tracking down those bugs can be spent on more productive things, therefore it is known as The Billion Dollar mistake coined by a British computer scientist, Sir Charles Antony Richard Hoare.