How-to articles, tricks, and solutions about NULL

Avoiding NullPointerException in Java

A NullPointerException is a runtime exception that is thrown when an application attempts to use an object reference that has a null value. To avoid this exception, you need to make sure that the object reference is not null before you use it.

How to check if my string is equal to null?

To check if a string is equal to null in Java, you can use the == operator.

Null object in Python

In Python, the "null" object is called None.

PHP json_decode() returns NULL with seemingly valid JSON?

There are a few possible reasons that json_decode() might return NULL when given what appears to be valid JSON.

The Difference Between Null and Undefined in JavaScript

Read this JavaScript tutorial and get relevant information about the differences between null and undefined data types. Find out their similarities as well.

Why is my Spring @Autowired field null?

There are several reasons why an @Autowired field in a Spring bean might be null: