Thank you Yogesh. Here is what I was investigating:
1. Are type suffixes allowed, optional or prohibited?
It is invalid to use the long suffix.
It is okay to use the float or double suffix.
It is okay to specify a double (2d) in Float.parseFloat
It is okay to specify a float (2f) in Double.parseDouble
2. Does �2.0� mean double or does it mean either float or double?
It doesn�t matter, because both are acceptable to Float.parseFloat and Double.parseDouble.
3. The API
doc for Float.parseFloat refers to Float.valueOf. The API doc for Float.valueOf refers to JLS 3.10.2. JLS 3.10.2 says a float literal must have a suffix. However, if you look at the source code for Float.valueOf, you will see that any of the following: no suffix f F d D is acceptable.
[ May 12, 2003: Message edited by: Marlene Miller ]