One of the most frequently posed Infosys technical interview questions, be ready for it. When a non-primitive variable does not point to or relate to any object, it is referred to as null.  String str = null; //declaring null
if(str == null) //  determining whether or not value is null   int length = str.length();
//using a null value will result in an error NullPointerException;