Vince Botteman wrote:In the answer option D (LimpException) is said to be incorrect because the method split throws HurtException and no other exception. Therefore catching LimpException would be unreachable code because HurtException is already caugth.
But I can compile following code, so answer D is correct. I do receive a warning in my IDE about unreachable code but the source compiles and runs.
Vince Botteman wrote:I think the code will not compile
Jeanne Boyarsky wrote:Roel: That's evil!
Vince Botteman wrote:It takes my knowledge of exceptions one step further.
Roel De Nijs wrote:Given this class hierarchy
which of these methods will not compile and/or not run successfully? And why not?
Mushfiq Mammadov wrote:It is interesting that why don't you write study guide about certification?
Vince Botteman wrote:The answers of the quiz:
This time it fails to compile because the catch block is unreachable.