Tuesday, November 29, 2011

can we write return statement in try catch or finally block.

Yes,We can write the return statement in try catch & finally. The only thing is that even if we write return statement in try bloack or catch block the finally block will always get executed.The only case in which finally block does not execute is when we write system.exit(0) in either try or catch.:No man we can&
Category:Java Interview Questions

No comments:

Post a Comment