What is optional and why it is there? | Java8
Have you ever been tired of putting null checks all over the code to avoid any unnecessary NullPointerExceptions. Java 8 has introduced a new class Optional in java.util package. It is used to represent a value is present or absent. The main advantage of this new construct is that No more too many null checks and NullPointerException. It avoids […]