If a try statement has catch blocks for both ClassCastException and RuntimeException, then which of the following
Question:
If a try statement has catch blocks for both ClassCastException and RuntimeException, then which of the following statements is correct?
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 ClassCastException must appear before the catch block for RuntimeException.
D. The catch block for RuntimeException must appear before the catch block for ClassCastException.
E. None of the above.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
OCP Oracle Certified Professional Java SE 11 Developer Practice Tests Exam 1Z0 819 And Upgrade Exam 1Z0 817
ISBN: 9781119696131
1st Edition
Authors: Scott Selikoff, Jeanne Boyarsky
Question Posted: