Exam 10: Exception Handling
Exam 1: An Overview of Computer Programming50 Questions
Exam 2: Applications and Data50 Questions
Exam 3: Making Decisions50 Questions
Exam 4: Looping50 Questions
Exam 5: Arrays50 Questions
Exam 6: Using Methods50 Questions
Exam 7: Object-Oriented Concepts50 Questions
Exam 8: More Object Concepts50 Questions
Exam 9: Event-Driven Programming With Graphical User Interfaces50 Questions
Exam 10: Exception Handling50 Questions
Exam 11: System Modeling With the Uml50 Questions
Exam 12: Manipulating Larger Quantities of Data50 Questions
Select questions type
A(n) ____________________ block includes any number of statements that might cause exceptions.
Free
(Short Answer)
4.8/5
(35)
Correct Answer:
try
A system of passing exceptions through the chain of calling methods has great advantages because it allows methods to handle exceptions wherever the programmer has decided it is most appropriate.
Free
(True/False)
4.8/5
(32)
Correct Answer:
True
Each ____________________ block can catch only one type of exception.
Free
(Short Answer)
4.8/5
(34)
Correct Answer:
catch
Only the first ____________________ statement in a try block throws an exception.
(Short Answer)
4.9/5
(39)
Dividing by 0 is an error in every programming language because it is an operation that is not defined mathematically.
(True/False)
4.7/5
(28)
A ____ is a segment of code that can handle an exception that might be thrown by the try block that precedes it.
(Multiple Choice)
4.8/5
(35)
Using a traditional error-handling method to avoid dividing by 0 prevents the error and makes the method more flexible.
(True/False)
4.7/5
(39)
A catch block consists of four different elements: the keyword catch, followed by parentheses that contain an exception type and identifier, statements that take action to handle the error condition, an endcatch statement, and a return statement.
(True/False)
4.7/5
(35)
The block of code that processes an error in exception handling "____."
(Multiple Choice)
4.8/5
(46)
When a division by 0 happens during the execution of a method, the application that calls the method typically terminates, control returns to the operating system, and a(n) ____________________ is generated.
(Short Answer)
4.8/5
(35)
____________________ code statements are program statements that can never execute under any circumstances.
(Short Answer)
4.9/5
(37)
When an exception is created and ____________________, the catch block that follows and contains an Exception argument executes.
(Short Answer)
5.0/5
(41)
A ____ is one that sends an exception object out of a method so it can be handled elsewhere.
(Multiple Choice)
4.8/5
(44)
____ statements are program statements that can never execute under any circumstances.
(Multiple Choice)
4.8/5
(38)
To create your own throwable exception, you usually ____________________ a built-in Exception class.
(Short Answer)
4.8/5
(28)
As opposed to exception handling, program ____________________ is abrupt and unforgiving.
(Short Answer)
4.9/5
(43)
____ is thrown when an object reference does not correctly refer to a created object.
(Multiple Choice)
4.9/5
(38)
To create your own throwable Exception, you usually extend a built-in ____ class.
(Multiple Choice)
4.8/5
(39)
If method A calls method B and method B throws an exception, which method will catch the exception, assuming all methods have a catch block?
(Multiple Choice)
4.8/5
(32)
Showing 1 - 20 of 50
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)