Does finally always run?
QuizEasy-MediumJava onlyAsked in: Accenture, Capgemini, Cognizant, Infosys, TCS
In which cases does the finally block run? Pick all that apply.
- The try block executes
return - The try block throws an exception that no catch matches
- The try block calls
System.exit(0) - The try block is inside a loop and executes
break
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.