Exam 10: Exceptions
Exam 1: Introduction40 Questions
Exam 2: Data and Expressions40 Questions
Exam 3: Using Classes and Objects40 Questions
Exam 4: Conditionals and Loops40 Questions
Exam 5: Writing Classes40 Questions
Exam 6: Graphical User Interfaces40 Questions
Exam 7: Arrays40 Questions
Exam 8: Inheritance40 Questions
Exam 9: Polymorphism39 Questions
Exam 11: Recursion40 Questions
Exam 10: Exceptions40 Questions
Exam 12: Searching and Sorting40 Questions
Exam 13: Trees40 Questions
Exam 14: Introduction to Collections and Stacks40 Questions
Exam 15: Heaps and Priority Queues40 Questions
Exam 16: Graphs40 Questions
Select questions type
Which of the following exception types must always be caught unless they are contained in methods that throw them in the method header?
(Multiple Choice)
4.9/5
(34)
Which of the following file streams should be explicitly closed to ensure that written data is properly retained?
(Multiple Choice)
4.8/5
(42)
Unchecked exceptions must be caught or propogated, or a program will not compile.
(True/False)
4.8/5
(35)
The Exception class and the Error class are subclasses of the ___________________ class.
(Multiple Choice)
4.8/5
(41)
A(n) ____________________ is used to specify how certain exceptions should be handled.
(Multiple Choice)
4.9/5
(35)
Is the Exception class a subclass of the Error class? Explain.
(Short Answer)
4.7/5
(38)
Attempting to divide by zero will result in an Error being thrown, not an Exception.
(True/False)
4.8/5
(30)
The _________________ statement is used to begin exception propogation.
(Multiple Choice)
4.9/5
(25)
A(n) _____________________ is an object that defines an erroneous situation from which the program usually cannot recover.
(Multiple Choice)
4.8/5
(41)
The getMessage method of the Exception class prints out the stack trace, which helps the user to track down the source of the exception.
(True/False)
4.8/5
(40)
If an exception is not caught, a program will __________________________ .
(Multiple Choice)
4.9/5
(29)
In practice, it is important to catch all exceptions that might be thrown by a program.
(True/False)
4.8/5
(38)
A(n) ____________________ can be used to find the exact line where an exception was thrown during program execution.
(Multiple Choice)
4.7/5
(40)
How is a finally clause different from a try block and a catch clause?
(Short Answer)
4.8/5
(41)
Showing 21 - 40 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)