Written by
Rafael del Nero
Join the discussion

4 comments
    • Hi Zishan, I would need more context in your question. The principles to handle Exceptions are pretty much the same with any tool. Try to apply them in the same way with Apache Camel.

  • I think your explanation is wrong in one point: The FileNotFoundException will be caught in the outer try-catch-finally-block (the one that adds “exc” and “fin”). However, you state that the code execution “continues” and that the NPE is thrown and caught in that particular catch block. The line that throws the NPE will not be executed at all.
    The solution is still the same.

Senior Java Interview Questions from Global Companies

Includes detailed answers and practical explanations from real interviews.

Delivered to your email within minutes.