MCQs
Total Questions : 15
| Page 1 of 2 pages
Answer: Option A. -> new
new is used to create instance of an exception. All of java's built in run-time exceptions have two constructors : one with no parameters and one that takes a string parameter.
Answer: Option C. -> throw
throw
Answer: Option C. -> Throwable
Throwable
Answer: Option C. -> throws
If a method is capable of causing an exception that it does not handle. It must specify this behaviour the behaviour so that callers of the method can guard themselves against that exception. This is done by using throws clause in methods declaration.
Answer: Option A. -> Default handler
Default handler
Answer: Option A. -> Run Time
Exceptions in java are run-time errors.
Answer: Option C. -> thrown
Exceptional handling is managed via 5 keywords “ try, catch, throws, throw and finally.
Answer: Option C. -> throw
throw
Answer: Option D. -> catch
If an exception occurs within the try block, it is thrown and cached by catch block for processing.
Answer: Option A. -> try
try