Page 1 of 1

About Question enthuware.ocajp.i.v7. 2 .1025 :

Posted: Tue Jul 21, 2015 3:09 am
by Roibeard
You can have any number of catch blocks in any order but each catch must be of a different type. Also, a catch for a subclass exception should occur before a catch block for the superclass exception.
The second statement contradicts the first statement.

Re: About Question enthuware.ocajp.i.v7.2.1025 :

Posted: Tue Jul 21, 2015 4:15 am
by admin
Well, the first statement is a general statement while the second statement is an exception to the rule :) The explanations to the questions are not meant to be one line definitions that are complete in themselves. An explanation is not a definition. You have to read the whole explanation together, not each sentence in isolation.
If you prefer terse one liners that tell you the complete concept in one sentence, you may want to read the JLS :)

Re: About Question enthuware.ocajp.i.v7. 2 .1025 :

Posted: Tue Jul 21, 2015 7:49 am
by Roibeard
Dig. Thank you.