TVPROG4 LESSON 10.1 QUIZ
1. The segment of code that handles or takes appropriate action following an exception is a
__________ block.
a.catch
b.try
c.throws
2. In object-oriented terminology, you __________ a procedure that might not complete correctly.
a.try
b.catch
c.handle
3. You __________ within a try block.
a.can place any number of statements
b.must place only a single statement
c.must place at leats two statements
4. The method that ends the current application and returns control to the operating system is
___________.
a.system.exit()
b.system.done()
c.system.end()
5. An advantage to using a try...catch block is that exceptional events are ___________.
a.isolated from regular events
b.reduced
c.eliminated
6. A(n) __________ is a statement used in testing programs that should be true; if it is not true, an
Exception is thrown.
a.assertion
b.throwable
c.varification
7. In object-oriented programming terminology, an unexpected or error condition is a(n)
___________.
a.exception
b.anomaly
Chapter 121.In object-oriented programming terminology, an unexpected or error condition is a(n):exception2.All Java Exceptions are:throwables3.Which of the following statements is true:Errors are more serious than Exceptions4.The method that ends the current application and returns control to the operating systemis:System.exit()5.In object-oriented terminology, you _________________ a procedure that might notcomplete correctly:try6.A method that detects an error condition or Exception _________________ anException:throws7.A try block includes all of the following elements except:the keyword catch8.The segment of code that handles or takes appropriate action following an exception is a___________ block:catch9.You _____________ within a try block:can place any number of statements10.If you include three statements in a try block and follow the block with three catchblocks, and the second statement in the try block throws an Exception, then:the fistmatching catch block executes11.When a try block does not generate an Exception and you have included multiple catch
- All Textbook Solutions
- Java Programming (9th Edition)
- In object-oriented programming terminology, an unexpected or error condition is a(n) __. a. anomaly b. exception c. deviation d. aberration
This textbook is available at
Java Programming (9th Edition)
Book Edition | 9th Edition |
Author(s) | Farrell |
ISBN | 9781337397070 |
Publisher | Cengage |
Subject | Computer Science |
Learning About Exceptions
Trying Code and Catching Exceptions
Throwing and Catching Multiple Exceptions
Understanding the Advantages of Exception Handling
Specifying the Exceptions That a Method Can Throw
Tracing Exceptions through the Call Stack
Creating Your Own Exception Classes
Displaying the Virtual Keyboard
Chapter 12, End of Chapter, Review Questions, Exercise 1
In object-oriented programming terminology, an unexpected or error condition is a(n) ________.
Verified Answer and Explanation
Here is a tip:
ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur a
Explanation
o is an option
rem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec
u is an option
gue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing
f is an option
, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacin
o is an option
ec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar