Question: IMMEDIATE. I'll upvote Assume there exist two classes named Base and Derived, such that Base is a subclass of Exception and Derived a subclass class.

 IMMEDIATE. I'll upvote Assume there exist two classes named Base and

Derived, such that Base is a subclass of Exception and Derived a

IMMEDIATE. I'll upvote

Assume there exist two classes named Base and Derived, such that Base is a subclass of Exception and Derived a subclass class. What is the output of the following code? public class Example \{ public static void main(string[] args) 1 try \{ throw new Base (); catch (Derived b) \{ System.out.println ("Hey!"); catch (Exception d) \{ System.out.println("Hi!"); a. Hi ! b. Hey ! c. Code will cause a run time error d. Code has a compilation error

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!