Hi, I thought I get runtime exception when compiled and run the following. System.out.print( new Float("1e1f")); // 4 System.out.print( new Float(".1e1d")); // 5 but it is printing 10.0 and 1.0 . Can anyone explain answer? Thanks, Prasad
1e1f is 1 times 10 to the 1st power, or 10; the "f" modifies the number to make it a float rather than a double. .1e1 is 0.1 times 10 to the first power, or 1; the "d" is redundant, but modifies the number to be a double.