OOP2 - CH 11 Exam

Name:
Section 1: Multiple Choice Questions
1) In a stack trace, each line contains the .........., and .........., followed by the .......... and ........... (order matters)
A) Class name, method, file name, line number
B) File name, class name, method, line number
C) Line number, method, file name, class name
D) Method, line number, class name, file name
2) An indication of a problem that occurs during a program's execution:
A) Compilation Error
B) Robust
C) Exception
D) Stack trace
3) We say about an exception ……………. When there are no matching catch blocks:
A) ThreadDeath
B) Uncaught exception
C) Asynchronous event
D) Catch-or-declare requirement
4) Try block and its corresponding catch and/or finally blocks, form a ...........:
A) Exception
B) try statement
C) catch clause
D) finally block
5) Information displayed when an exception occurs and is not handled:
A) Fault- tolerant programs
B) Death thread
C) Standard error stream
D) Stack trace
6) ……… Catches and handles an exception:
A) Try block
B) Stack trace
C) Catch clause
D) Finally block
7) It's a ……….. Error to place code between a try block and its corresponding catch blocks:
A) Compilation error
B) Logic error
C) Runtime error
D) Syntax error
8) Java does not allow division by zero in integer arithmetic, it throws a(n) …………………….:
A) ArithmeticException
B) InputMismatchException
C) ArrayIndexOutOfBoundsException
D) SecurityException
 
 
 
 
 
 
Section 2: True or False
1) Finally block will execute whether or not an exception is thrown in the corresponding try block
True
False
2) An InputMismatchException occurs when Scanner's method NextInt receives a String that doesn't represent a valid integer:
True
False
3) not only Throwable objects can be used with the exception-handling mechanism
True
False
4) With exception handling, a program can continue executing after dealing with a problem
True
False
5) At least one catch block or a finally block must immediately follow the try block
True
False
6) Class Error and its subclasses can be caught and handled by the application
True
False
7) Finally block will execute even if the application exits early from a try block by calling method System.exit
True
False
{"name":"OOP2 - CH 11 Exam", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Name:, Section 1: Multiple Choice Questions, 1) In a stack trace, each line contains the .........., and .........., followed by the .......... and ........... (order matters)","img":"https://www.quiz-maker.com/3012/images/ogquiz.png"}
Powered by: Quiz Maker