Hi Ranchers
I came accross a question (given below) while preparing for
scjp .The question goes like this
Which statement is true?
A A try statement must have at least one corresponding catch block.
B Multiple catch statements can catch the same class of exception more than once.
C An Error that might be thrown in a method must be declared as thrown by that method, or be handled within that method.
D Except in case of VM shutdown, if a try block starts to execute, a corresponding finally block will always start to execute.
E Except in case of VM shutdown, if a try block starts to execute, a corresponding finally block must always run to completion.
Answer: E
I think the answer given by author is incorrect (to my knowledge it will be option
D
)because we can't be sure of completion of finally block as it may also throw any exception of it own.What you guys think about it ?.