# null Java Keyword

null is a Java reserved word representing no value.

## Examples

      Integer i;
      i = null;

      String s;
      if (s != null)
      {
         <statements>
      }

## Remarks

- Assigning null to a non-primitive variable has the effect of releasing the object to which the variable previously referred.

- null cannot be assigned to variables of primitive types (byte, short, int, long, char, float, double, boolean)

Related Topics

None.