[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Double Wrapper?




Hello,

The class Double constructor is (public Double(String s) throws
NumberFormatException) declared with NumberFormatException (API docs).  Why
do this particular constructor not required to be enclosed in a try/catch
block?

I was under the impression that if a method is declared to throw an
exception the calling method should provide a try/catch or declare itself to
throw the exception.

Thanks in advance,
D. Michael Nelson.