I got this answer right because I have seen this question in dan's topic exams, but I do not understand. Could someone go into a little more detail on why the answer is "E".
Thanks
Chris G.
Thanks
Chris G.
Originally posted by Chris Gastin:
I got this answer right because I have seen this question in dan's topic exams, but I do not understand. Could someone go into a little more detail on why the answer is "E".
Thanks
Chris G.
An instance initializer of a named class may not throw a checked exception unless that exception or one of its superclasses is explicitly declared in the throws clause of each constructor of its class and the class has at least one explicitly declared constructor. An instance initializer in an anonymous class (�15.9.5) can throw any exceptions.