Java historically treats all object references as potentially null by default – there is no built-in way in the type system to indicate whether a variable can or cannot be null . This implicit “nullable by default” design has led to the infamous NullPointerException (“billion-dollar mistake” as Tony Hoare called it ) when null values aren’t handled properly. For decades, developers had to rely on documentation, runtime checks, or patterns like returning sentinel values/Optional to signal absence of a value .
To improve safety, the Java ecosystem introduced nullability annotations (e.g. @Nullable, @NonNull/@NotNull) and static analysis tools. However, a key question arises: should we assume types are non-nullable by default (requiring explicit annotation of