Because 1/0 is an integer literal, and class Double does not have a constructor that takes an integer literal. If you add a decimal point, it's a floating point literal, and Double does have a constructor that takes a double.
Edit: Hmmm, it seems I'm mistaken. Both 1/0 and 1/0. compile, but when you run the program, the version with 1/0 gives an ArithmeticException, while 1/0. does not (it prints "Infinity" when you print the value of the double. (I'm using
Java 1.5).
[ January 10, 2006: Message edited by: Jesper de Jong ]