• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

finally clause question

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Abhishek,
You are right, it's also given in the two minute drill on page no.387
 
reply
    Bookmark Topic Watch Topic
  • New Topic