Multiple Choice
How many times will the code in the try block in the accompanying figure execute?
A) Until the user specifies that he/she wants to quit the program
B) Until the user inputs a valid integer
C) If there is an exception thrown, it will execute just once because the program will terminate at that point.
D) Zero times; the program will terminate before it reaches the try block.
Correct Answer:

Verified
Correct Answer:
Verified
Q39: The MouseListener interface defines _ methods.<br>A) two<br>B)
Q40: The methods getMessage and printStackTrace are private
Q41: If a negative value is used for
Q42: When is a finally block executed?<br>A) Only
Q43: Which of the following is NOT a
Q45: To handle window events, you first create
Q46: What is the most likely type of
Q47: The class Exception contains two constructors.
Q48: An exception that can be recognized by
Q49: Every program with a try block must