A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
  • Newsletters

option

A collection of 1 posts
Handling null: optional and nullable types
Development

Handling null: optional and nullable types

Java has long been infamous for its NullPointerException. The reason for the NPE is calling a method or accessing an attribute of an object that has not been initialized. var value = foo.getBar().getBaz().toLowerCase(); Running this snippet may result in something like the following: Exception in thread 'main' java.lang.NullPointerException at ch.frankel.blog.NpeSample.main(NpeSample.

Apr 3, 2022
A Java geek © 2008-2026
v. 1e36702bdd5aadacde73bd395fb1b580e1d1f65d/13988790172
Latest Posts