Question about page 308 (Java OCA 8 Programmer I Study Guide)
posted 2 months ago
The above code is presented on page 308. i have a concern with below paragraph that's also mentioned on the same page, the bold part sounds like we're skipping code in finally clause(line 19) if the code in catch clause is run.
The girl falls on line 15. If she gets up by herself, the code goes on to the finally block
and runs line 19. Then the try statement is over and the code proceeds on line 21. If the
girl doesn’t get up by herself, she throws an exception. The catch block runs and she gets a
hug on line 17. Then the try statement is over and the code proceeds on line 21. Either way,
the ending is the same. The finally block is executed and the try statement ends.