• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

finally clause question

 
Heena Velani
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
In K&B, on page no.348 it is mentioned that,
"Later we'll look at the few scenarios in which finally might not run or complete".
But after reading the whole topic of exception I couldn't find any examples. Does anybody know about any scenarios where finally clause might not run or complete? Or if it is in the book can anybody please tell at which place they are mentioned.
 
abhishek pendkay
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a finally block will fail to run only in extreme cases such as
1) your JVM crashes
2) your system crashes
3) you get some sort of JVM error
you got what i want to say right so it takes a catastrophic situation for a finally block not to run and also this is mentioned in K&B i have read it just dont remember the page
 
Heena Velani
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Abhishek,
You are right, it's also given in the two minute drill on page no.387
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic