In Java, it is possible for a reference type variable to refer to nothing at all. A reference that refers to nothing at all is called a null reference . By default, an uninitialized reference is null.
We can explicitly assign the null reference to a variable like this:
f = null;Also, we can test explicitly for the null reference like this
if (f == null) { /* ... */ }