Question: Which statement about the following program is true? A. An exception is printed at runtime with Call in the message. B. An exception is printed

Which statement about the following program is true? 

package tag; class MissedCallException extends Exception {} public class Phone { static

A. An exception is printed at runtime with Call in the message.

B. An exception is printed at runtime with Voicemail in the message.

C. An exception is printed at runtime with Text in the message.

D. The code does not compile.

E. None of the above.

package tag; class MissedCallException extends Exception {} public class Phone { static void makeCall() throws RuntimeException { throw new ArrayIndexOutOfBounds Exception ("Call"); } } public static void main(String[] messages) { try { } makeCall(); } catch (MissedCall Exception e) { throw new Runtime Exception ("Voicemail"); } finally { throw new Runtime Exception ("Text"); }

Step by Step Solution

3.44 Rating (167 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The image shows a Java program with a main class named Phone and a custom exception class MissedCall... 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!