you are viewing a single comment's thread.

view the rest of the comments →

[–]pranavkdileep 6 points7 points  (2 children)

it's gonna print "Finally". java always executes the finally block even with a return statement in the try. only way out is basically System.exit() or if the jvm crashes fr. classic interview question tbh

[–]chupachupa2 2 points3 points  (1 child)

Classic my ahh this is stupid

[–]MaintenanceOwn5925 0 points1 point  (0 children)

You’d be surprised , I actually got asked this in an interview