Java doesn’t have compile-time null safety, so developers can still use null freely, often leading to the infamous NullPointerException and painful production bugs. Null safety in Java is more than defensive coding, it’s the story of how the language, APIs, and tools have evolved to represent “no value” more clearly.
This talk explores the past, present, and future of null safety in Java, from null checks, the Null Object pattern, annotations, and Objects.requireNonNull to newer features like pattern matching, switch guards, and design choices such as using empty collections instead of null.
Come see how Optional made APIs more declarative and expressive, especially in Streams. We’ll also look at how JSpecify and Project Valhalla are advancing null safety and how static analyzers can help. You’ll leave knowing how to write modern, null-safe Java using the right patterns, tools, and language features to keep NullPointerExceptions out of your code.
Type: Learning Session (50 min)
Track: Core Java Platform
Audience Level: Intermediate