>     One more thing I need from the Float/Double person[s]: where (and how)
>can spaces be in the input string, and what happens when an unrecognized
>character is hit?  Is a NumberFormatException thrown, or is the rest of the
>string simply ignored?  (I have wondered this myself.)  Actually this goes
>for the parsing of Integer/Long/etc., but I can just look and figure that
>one out for myself.

If the string doesn't parse completely, an exception is thrown.  It does not
stop parsing a la atoi().

>I declared an @exception clause, but I removed the throws
>NullPointerException part from all of them.

I recommend against declaring that a method throws exceptions from
java.lang.  (Javadoc'ing them is probably good though, but perhaps things
like NullPointerException are a bit overkill).  If you put them in the
method decl, then the compiler will force any callers to catch them or
declare that they throw the method instead of allowing them to propagate
upward silently as normal.

--
Aaron M. Renn ([EMAIL PROTECTED]) http://www.urbanophile.com/arenn/


Reply via email to