You'll note that the constructor Long(String) throws a NumberFormatException "if the String does not contain a parsable long." And in order to be a parsable long, "the characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ... to indicate a negative value."
Therefore, "1.0" is not a parsable long. If your String was simply "1" (without a decimal point), then it would work. [ September 14, 2004: Message edited by: marc weber ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org