Programming - Exception Handling
You Are Here :: Home > JAVA > Exception Handling - General Questions
31. |
A ______________________ block can be followed by multiple catch blocks.
|
A. |
try |
B.
|
catch |
C.
|
Finally
|
D.
|
throws
|
|
Answer: Option A
Explanation:
A try block can be followed by multiple catch blocks. |
|
32. |
A ________________ block of code always executes, whether or not an exception has occurred.
|
A. |
try |
B.
|
catch |
C.
|
Finally
|
D.
|
throws
|
|
Answer: Option C
Explanation:
A finally block of code always executes, whether or not an exception has occurred. |
|
33. |
_________________ are exceptions/errors that are exclusively or logically thrown by the JVM.
|
A. |
JVM Exception |
B.
|
JEE Exceptions |
C.
|
JIT Exception
|
D.
|
Exception
|
|
Answer: Option A
Explanation:
JVM Exceptions: - These are exceptions/errors that are exclusively or logically thrown by the JVM. |
|
34. |
___________________ exceptions are thrown explicitly by the application or the API programmers
|
A. |
Programmatic exceptions |
B.
|
Synchronous exceptions |
C.
|
both A and B
|
D.
|
none
|
|
Answer: Option A
Explanation:
Programmatic exceptions . These exceptions are thrown explicitly by the application or the API programmers |
|
35. |
______________________ happen at a specific program statement whereas asynchronous exceptions can raise practically anywhere.
|
A. |
Programmatic exceptions |
B.
|
Synchronous exceptions |
C.
|
both A and B
|
D.
|
none
|
|
Answer: Option B
Explanation:
Synchronous exceptions happen at a specific program statement whereas asynchronous exceptions can raise practically anywhere. |
|
36. |
when beyond the bound of index in the object which use index, such as array,string and vector called _______________________.
|
A. |
IndexOutOfBoundsException |
B.
|
ArrayStoreException |
C.
|
NegativeArraySizeException
|
D.
|
NullPointerException
|
|
Answer: Option A
Explanation:
when beyond the bound of index in the object which use index, such as array,string and vector called IdexOutOfBoundsException. |
|
« prev
next »