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?

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
The image shows a Java program with a main class named Phone and a custom exception class MissedCall... View full answer
Get step-by-step solutions from verified subject matter experts
