I have the following two object variables
Date a;
Date b=null;
Definitely both 'a' and 'b' are not referring to any objects.
Now if I invoke following statement
System.out.println(a.toString());
There will be a compile time error, whereas if I invoke the following statement
System.out.println(b.toString());
There will be no compile time error but there will be a runtime error. What is the reason for this and what value will be actually stored in 'b' to represent a null value?