1. |
When does Exceptions in Java arises in code sequence?
|
||||||||
Answer:
Option (a) |
2. |
Which of these keywords is not a part of exception handling?
|
||||||||
Answer:
Option (c) |
3. |
Which of these keywords must be used to monitor for exceptions?
|
||||||||
Answer:
Option (a) |
4. |
Which of these keywords must be used to handle the exception thrown by try block in some rational manner?
|
||||||||
Answer:
Option (d) |
5. |
Which of these keywords is used to manually throw an exception?
|
||||||||
Answer:
Option (c) |
6. |
What will be the output of the following Java program?
class exception_handling { public static void main(String args[]) { try { int a, b; b = 0; a = 5 / b; System.out.print("A"); } catch(ArithmeticException e) { System.out.print("B"); } finally { System.out.print("C"); } } }
|
||||||||
Answer:
Option (d) |
7. |
Which of the following classes can catch all exceptions which cannot be caught?
|
||||||||
Answer:
Option (b) |
8. |
Which of the following is a super class of all exception type classes?
|
||||||||
Answer:
Option (d) |
9. |
Which of the following keyword is used by calling function to handle exception thrown by called function?
|
||||||||
Answer:
Option (a) |
10. |
Which of the following handles the exception when a catch is not used?
|
||||||||
Answer:
Option (c) |