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. 9744a65fcb2ff5057d025d26766c50d6f934fc0b/13747693232
Latest Posts