This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Exception Handling Question

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi people,

Which one of the following exceptions does NOT require exception handling code?
Choice 1
java.lang.Exception
Choice 2
java.lang.Throwable
Choice 3
java.io.FileNotFoundException
Choice 4
java.io.IOException
Choice 5
java.lang.RuntimeException

Kindly suggest me the correct answer and refer me some pointers on the web to strengthen this topic.
Thanks
 
Ranch Hand
Posts: 1880
Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ans : choice 5

Here i listed few useful links for exception handling.

Link1
Link2
Link3

 
Ranch Hand
Posts: 522
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Unchecked Exceptions
1) Represented by class 'RuntimeException', 'Error' and all their subclasses.
2) You are not obliged to catch these exceptions or declare them in a throws clause.

Checked Exceptions
1) All the classes that are not mentioned in the unchecked exception list are considered Checked Exceptions.
2) You are obliged to catch these exceptions or declare them in a throws clause.

You can find Java Exceptions hierarchy here . Now you can answer your own question.
[ January 17, 2005: Message edited by: Vicken Karaoghlanian ]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic