group-icon
Java Developers
Group for Java developers and programmers. Ask questions and get answers related to Java programming
252 Members
Join this group to post and comment.
Archana Priyadarshini
Archana Priyadarshini
Computer Science
08 Feb 2019

Return statement or System.exit () on try or catch block? Will finally block execute?

Putting a return statement in the try or catch block or calling System.exit() from try or catch block :

finally block will execute even if you put a return statement in the try block or catch block but finally block won't run if you call System.exit() from try or catch block.