Question: If a try statement has catch blocks for both IllegalArgumentException and NullPointerException, then which of the following statements is correct? A. The catch blocks for

If a try statement has catch blocks for both IllegalArgumentException and NullPointerException, then which of the following statements is correct? 

A. The catch blocks for these two exception types can be declared

A. The catch blocks for these two exception types can be declared in any order. B. A try statement cannot be declared with these two catch block types because they are incompatible. C. The catch block for IllegalArgumentException must appear before the catch block for NullPointerException. D. The catch block for NullPointerException must appear before the catch block IllegalArgumentException. for E. None of the above.

Step by Step Solution

3.36 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The image displays a multiplechoice question concerning the order in which catch blocks fo... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Oracle Questions!