• 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

Question 132

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. I'm not trying to be picky, but I missed this question when I wouldn't have if it were worded slightly differently.
(#132)TRUE or FALSE: if an exception is not caught, the finally block will run and the rest of the method is skipped.
My line of thinking is "what if an exception is not thrown?", or execution runs without throwing an exception. The rest of the method would execute then.
I think the question might be a bit better if it said "If an exception is thrown and not caught", or something like that.
Have an excellent day!
--Jeff
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
then also ur finally block will get executed.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is Excpetion is thrown and you don't catch it still the finally block will get executed it don't get executed on if
1 u switch off the computer
2 u call System.exit()
3 there is a exception in Finally block itself..
4 Light Goes off (HA HA HA ha )
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic