The Startup
Published in

The Startup

Optionals Can Ruin Readability of Your Code in Java

What are Optionals?

Optionals have been introduced in Java 8. This concept is borrowed from other languages. Primarily from languages of functional nature like Haskell, F# etc. Optional is a container object which may or may not contain a non-null value.

Why using it?




Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +756K followers.

Recommended from Medium

Conquering Frontend Mentor — Challenge -3

Collection in Dart

Introduction to Address Resolution Protocol (ARP)

The Unfortunate Learning Moment

Separate the Numbers

FireStore now supports IN Queries & array-contains!!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alex Kondrashov

Alex Kondrashov

Team Lead at Kyckr; Writing about my experience as a software engineer

More from Medium

Configuring Spring Boot’s Server, GZip compression, HTTP/2, caching and much more

Reverse proxy using Netflix’s Zuul in Spring Boot

Chain of Responsibility Design Pattern

Creational Design Patterns in Java