Multiple Choice
If you want to provide your own code to terminate the program when the window is closed, or if you want the program to take a different action when the window closes, then you use the interface ____.
A) WindowListener
B) ActionListener
C) CloseListener
D) MouseListener
Correct Answer:

Verified
Correct Answer:
Verified
Q3: NoSuchElementException is a method of the class
Q5: If you have created an exception class,
Q11: The StringIndexOutOfBoundsException could be thrown by the
Q16: The MouseListener interface defines _ methods.<br>A) two<br>B)
Q17: Which of the following methods prints a
Q18: How many constructors does the class Exception
Q21: To handle window events, if the class
Q24: int number;<br>Boolean done = false;do<br>{<br>Try<br>{<br>System.out.print("Enter an integer:
Q41: If a negative value is used for
Q42: When is a finally block executed?<br>A) Only