• 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
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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 )
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!