Programming - Exception Handling
You Are Here :: Home > JAVA > Exception Handling - General Questions
19.
The hierarchy of exception classes commence from _______________________ class.
A.
Throwable
B.
Throws
C.
get
D.
post
Answer: Option A
Explanation:
The hierarchy of exception classes commence from Throwable class
20.
A ____________________ contains a snapshot of the execution stack at the time it was created and also a message string that gives more information about the error.
A.
Throwable
B.
Throws
C.
get
D.
post
Answer: Option A
Explanation:
A throwable contains a snapshot of the execution stack at the time it was created and also a message string that gives more information about the error.
21.
_____________________ are thrown if any kind of unusual condition occurs that can be caught.
A.
Exceptions
B.
Assertion
C.
Abstraction
D.
Encapsulation
Answer: Option A
Explanation:
Exceptions are thrown if any kind of unusual condition occurs that can be caught.
22.
When any kind of serious problem occurs which could not be handled easily like OutOfMemoryError then an _____________________ is thrown.
A.
Error
B.
Message
C.
Alert box
D.
Pop Up box
Answer: Option A
Explanation:
Errors When any kind of serious problem occurs which could not be handled easily like OutOfMemoryError then an error is thrown.
23.
How many exception handler components are used to catch and handle the exceptions?
Answer: Option C
Explanation:
The three exception handler components are used to catch and handle the exceptions. These aretry, catch and finally clause.
24.
The _____________________ block executes if and only if the try block exits.
A.
try
B.
catch
C.
Finally
D.
throws
Answer: Option C
Explanation:
The finally block executes if and only if the try block exits.
« prev
next »