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

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
Roibeard
Posts: 19
Joined: Sun Jul 12, 2015 6:40 am
Contact:

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

Post 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.

admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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 :)

Roibeard
Posts: 19
Joined: Sun Jul 12, 2015 6:40 am
Contact:

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

Post by Roibeard »

Dig. Thank you.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests