I Will Get That Job At Google. | Using 'return' in finally blocks
Another interesting fact is that 'finally return' construction below will be processed (code below returns "false"):
try { return true; } finally { return false; }
Note that using return in finally blocks is really bad practice: you lose all the exceptons and leave them unhandled. Avoid such situations!
Read full article from I Will Get That Job At Google. | Using 'return' in finally blocks
No comments:
Post a Comment