The Startup
Published in

The Startup

One Way to Sidestep Potential Null Pointer Warning in Java

What’s in the box? Nothing. Photo by Kelly Sikkema on Unsplash

It’s silly to hate null pointer exceptions. If you pay attention to compiler warnings, it’s unlikely that a null pointer exception will catch you by surprise in a production context.

Test-driven development is also a big help in that department. A null pointer exception in a development context is then just a part of the process, not something to fear, much less…

--

--

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