Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is it legal to Return any value from finally block ?  RSS feed

 
Greenhorn
Posts: 21
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it legal to Return any value from finally block ?
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well java allows you to have return value in finally block.

But it is not advisable to do so.

The reason is it overrides the value in try block. Its not a good practise too.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!