Show
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
This textbook is available at Java Programming (9th Edition)
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 ExplanationHere is a tip:ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur a Explanationo 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 Related ExercisesIs an unexpected or error condition?In object-oriented programming, an exception is referred to as an unexpected or error condition. Hence, the correct answer is option “B”.
Which of the following refers to an error condition in object oriented programming terminology?EXCEPTION refers to an error condition in object - oriented to programming terminology .
Are errors more serious than exceptions?Officially, exceptions are distinct from errors because errors are more serious issues that the application “should not try to catch.” Most developers, however, consider errors to be just a subset of exceptions.
What is an exception in programming?Definition: An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program's instructions. When an error occurs within a method, the method creates an object and hands it off to the runtime system.
|