• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Question 132

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
then also ur finally block will get executed.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • 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 )
 
Don't touch me. And dont' touch this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic