Please see the following code and explain the output behavior.
public class MyFinalTest { public int doMethod(){ try{ throw new Exce
The finally block is always executed (if the matching try was executed) so before the method returns 5 as in the catch block, it executes the finally block and returns 10.
finally
catch