Exam 12: Exception Handling
Exam 1: Creating Java Programs61 Questions
Exam 2: Using Data67 Questions
Exam 3: Using Methods Classes and Objects66 Questions
Exam 4: More Object Concepts66 Questions
Exam 5: Making Decisions66 Questions
Exam 6: Looping66 Questions
Exam 7: Characters Strings and the Stringbuilder68 Questions
Exam 8: Arrays66 Questions
Exam 9: Advanced Array Concepts66 Questions
Exam 10: Introduction to Inheritance66 Questions
Exam 11: Advanced Inheritance Concepts66 Questions
Exam 12: Exception Handling66 Questions
Exam 13: File Input and Output66 Questions
Exam 14: Introduction to Swing Components66 Questions
Exam 15: Advanced Gui Topics66 Questions
Exam 16: Graphics66 Questions
Select questions type
In order to use a variable both with a try or catch block and afterward, you must declare the variable before the ____ block begins.
(Multiple Choice)
4.9/5
(37)
What things might a programmer do to cause a potential exception in a program?
(Essay)
4.7/5
(42)
Placing data conversion attempts in a try block allows you to handle potential data conversion errors caused by careless user entry.
(True/False)
4.9/5
(40)
If you create an object using Java's BigDecimal class, and then perform a division that results in a non-terminating decimal division such as 1/3, but specify that an exact result is needed, a(n) ____________________ is thrown.
(Short Answer)
4.7/5
(40)
The example code above uses the getMessage() method. Explain how the getMessage() method makes error message generation more specific to the error encountered.

(Essay)
4.9/5
(43)
A variable declared within a try or catch block is ____ to that block.
(Multiple Choice)
4.9/5
(37)
A(n) ____ is a Java language feature that can help you detect logic errors that do not cause a program to terminate, but nevertheless produce incorrect results.
(Multiple Choice)
4.9/5
(33)
When you catch an Exception object, you can call ____________________ to display a list of methods in the call stack so you can determine the location of the statement that caused the exception.
(Short Answer)
4.9/5
(40)
The code within a finally block cannot execute if the preceding try block identifies an exception.
(True/False)
4.8/5
(30)
Using the example code above, complete the statement of the catch block to generate the message that comes with the caught ArithmeticException .

(Short Answer)
4.9/5
(33)
Programs would be less clear if you had to account for ____ exceptions in every method declaration.
(Multiple Choice)
4.8/5
(38)
Assertions are meant to be helpful in the ____ stage of a program.
(Multiple Choice)
4.8/5
(33)
When an exception is a checked exception, client programmers are forced to deal with the possibility that an exception will be thrown.
(True/False)
4.8/5
(36)
The ____ class represents more serious errors from which your program usually cannot recover.
(Multiple Choice)
4.7/5
(32)
To create your own throwable Exception class, you must extend a subclass of Catchable .
(True/False)
4.8/5
(38)
When you have actions you must perform at the end of a try…catch sequence, you can use a ____ block.
(Multiple Choice)
4.8/5
(39)
When a program contains multiple ____ blocks, they are examined in sequence until a match is found for the type of exception that occurred.
(Multiple Choice)
4.8/5
(43)
Any ____________________ block might throw an Exception for which you did not provide a catch block.
(Short Answer)
4.8/5
(34)
Which method constructor constructs a new exception with the specified detail message and cause?
(Multiple Choice)
4.7/5
(37)
Showing 41 - 60 of 66
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)