Std 12 Computer Textbook Solution CH-10 Exception Handling in Java
1. Which of the following refers to an error condition in object-oriented programming Terminology?
a. Anomaly
b. abbreviation
c. exception
d. deviation
2. Which of the following is a correct word for all Java Exceptions?
a. Errors
b. Runtime Exceptions
c. Throwables
d. Omissions
3. Which of the following statements is true?
a. Exceptions are more serious than Errors.
b. Errors are more serious than Exceptions.
c. Errors and Exceptions are equally serious.
d. Exceptions and Errors are the same things.
4. Which of the following elements is not included in try block?
a. the keyword try
b. the keyword catch
c. the curly braces
d. statements that might cause Exceptions
5. Which of the following block handles or takes appropriate action when an Exception Occurs?
a. try
b. catch
c. throws
d. handles
6. Which of the following should be within a catch block?
a. finally block
b. single statement that handles Exception
c. any number of statements to handle Exception
d. throws keyword
7. What will happen when a try block does not generated an Exception and you have included multiple catch blocks?
a. they all execute
b. only the first matching one executes
c. no catch block executes
d. only the first catch block executes
8. Which of the following is an advantage of using a try ..... catch block?
a. Exceptional events are eliminated.
b. Exceptional events are reduced.
c. Exceptional events are integrated with regular events.
d. Exceptional events are isolated from regular events.
9. Which of the following methods can throw an Exception?
a. methods with throws clause
b. methods with a catch block
c. methods with a try block
d. methods with finally block
10. Which of the following is least important to know if you want to be able to use a method to its full potential?
a. the method’s return type
b. the type of arguments the method requires
c. the number of statements within the method
d. the type of Exceptions the method throw
0 comments: