liveBook · Manning

NullPointerException

NullPointerException is a Java runtime exception raised when code improperly dereferences or otherwise uses a null reference where an object is required.

How 2 Manning books explain it

100 Java Mistakes and How to Avoid Them

NullPointerException is the Java runtime exception raised when an operation dereferences or otherwise improperly uses a null reference.

How it is used
Frames null-related Java failures and prevention across APIs, varargs, initialization, and collections.
How deep it goes
Defines nullability concerns and develops focused failure mechanisms, stopping at prevention rules and tool guidance.
Examples
Uses null varargs casts, static field ordering, logger initialization, and Set.of contains(null) migration cases.
What you can do after
Diagnose/debug with it by tracing nullable flows, initialization order, varargs binding, and collection null policies.

Read how 100 Java Mistakes and How to Avoid Them explains NullPointerException →

Kotlin in Action, 2E

NullPointerException is a runtime exception raised when code dereferences a null reference where a non-null object is required.

How it is used
Uses nullability checks to prevent runtime dereference failures in JVM backends and Android applications.
How deep it goes
Explains nullable types and operators with a compact example, but defers deeper runtime and interoperability edge cases.
Examples
Demonstrates nullable and non-nullable String access and cites reduced Google Home crashes after Kotlin adoption.
What you can do after
Apply nullable types and Kotlin operators to prevent or explicitly handle possible null dereferences.

Read how Kotlin in Action, 2E explains NullPointerException →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.