Refactoring

Why and How to Use Optional in Java

The Optional object type in Java was introduced with version 8 of Java. It is used when we want to express that a value might not be known (yet) or it’s not applicable at this moment. Before Java 8 developers might have been tempted to return a null value in this case. Ultimately, there are… read more »

Sidebar