What if there is a break or return statement in try block followed by finally block?
Question
What if there is a break or return statement in try block followed by finally block?
Answer
If there is a return statement in the try block, the finally block executes right after the return statement encountered, and before the return executes.
š² Practice Offline on Mobile: Download the free QA Automation & SDET Prep app on Google Play & App Store.