Exception Handling

NullPointerException

English

Overview

A common exception thrown when code tries to operate on something that doesn't exist (null).

Details

A common runtime exception thrown in languages like Java when a method is called on a reference that's null. With a long call chain, the stack trace alone can make it hard to pinpoint where the null originated, so designs that prevent it up front using null-safe language features (Optional, nullable types) are preferred.

More Programming terms