The answer is 3 (only "c" is printed), but my question is that since NullPointerException is a RuntimeException, it doesn't have to be caught. So shouldn't the output be "a", "c" and "d"? [ September 01, 2007: Message edited by: Sachin Kapoor ]
If double can hold hexadecimal values, shouldn't the Double (wrapper) class's valueOf method be overloaded to take base/radix as argument?
There is no concept of storing hexidecimal numbers, even for integers. Integer variables stores integer numbers -- the compiler just allows you to define the integer in hexidecimal format.
For doubles, the compiler allows you to implicitedly cast from int to double. So in this case, you are casting an int literal (defined in hexidecimal format) to a double, and storing it in a double variable.