What is null

what is null.

null is the value of a reference variable when it doesn’t point to anything in memory. Think of it as a street sign with the name of a city on it, but no arrow, and the city doesn’t exist. :wink:

You can compare against it in if-sentences to see if objects have been instantiated yet. Objects are null up until the point someone instantiates them using the new keyword:

object test; // null
test = new object(); // No longer null, points to an actual object

Read more here: