Our team has conducted extensive research to compile a set of Exception Handling MCQs. We encourage you to test your Exception Handling knowledge by answering these # multiple-choice questions provided below.
Simply scroll down to begin!
A. Final
B. Throw
C. Catch
D. Try
If you are inserting any value in the wrong index as shown below, it would result in
1. int a[]=new int[5];
2. a[10]=50;
A.
ArithmeticException
B.
ArrayIndexOutOfBoundsException
C.
NumberFormatException
D.
NullPointerException
A. Try
B. Final
C. Catch
D. Throws
A. INT
B. Char *
C. Bool
D. Double
A. IOException class And RuntimeException Class
B. ClassCastException
C. IOException class
D. RuntimeException Class
A. No
B. Yes
A. It is not possible in CPP to restrict a function
B. Defining multiple try and catch block inside a function
C. Defining function with throw clause
D. Defining generic function within try block
A. None
B. Event Handling
C. String Handling
D. Exception Handling
Which provides a default exception handler that performs the following tasks?
- Prints out exception description.
- Prints the stack trace (Hierarchy of methods where the exception occurred).
- Causes the program to terminate.
A.
jdk
B.
None
C.
JRE
D.
JVM
A. None
B. Event Handling
C. Exception Handling
D. String Handling
A. True
B. False
A. Catch
B. Try
C. Finally
D. Throw
A. False
B. True
A. False
B. True
These exceptions are seen in
NullPointerException,
ArrayIndexOutOfBoundsException,
ArithmeticException,
NumberFormatException?
A.
Unchecked Exception
B.
Checked exception And Unchecked exception
C.
None
D.
Checked Exception
A. The Java Virtual Machine.
B. Code in a try block.
C. Calls from a try block to other methods.
D. All of the above
A. Error
B. Throwable
C. Exception
D. Menu