narasimha, the Double class constructor signatures are:
1) Double(double value)
2) Double(
String s)
As you can see the second constructor accepts String as a parameter, and as we all know String are objects in
java, so it is totally legal to send the
null reference to them, this is why the compiler doesn't complain about the
null argument.
Trying to access an object that is not there will always throw a NullPointerException, when you try to send "ABC" to the constructor, it will not throw NullPointerException because the object is there, it is simply not of the type expected.
Hope this helps.