Java Reference

Java Reference Home | Smart Soft Home

null

Category

Literals

Description

If an object is null if it does not point to anything.

Example

Room r1;

//r1 is now null

r1=new Room();

//r1 now points to a Room object and thus is not null

r1=null;

//r1 is null again