Java 8 Optional Usage and Best Practices
Introduction
According to Oracle documentation an Optional is a container object which may or may not contain a non-null value. It was introduced in Java 8 to cure the curse of NullPointerExceptions. In essence Optional is a wrapper…