aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Exception Handling Question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Exception Handling Question" Watch "Exception Handling Question" New topic
Author

Exception Handling Question

Swapan Mazumdar
Ranch Hand

Joined: Jul 23, 2003
Posts: 83
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
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1803
Ans : choice 5

Here i listed few useful links for exception handling.

Link1
Link2
Link3



Krishna Srinivasan
OCAJP Mock Questions
Vicken Karaoghlanian
Ranch Hand

Joined: Jul 21, 2003
Posts: 522
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 ]

- Do not try and bend the spoon. That's impossible. Instead, only try to realize the truth. <br />- What truth? <br />- That there is no spoon!!!
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Exception Handling Question
 
Similar Threads
java [question -- exception handling]
MDB vs DB approach
How does Scala compare with other scripting languages on the JVM as regards Exception Handling?
is there EJB3 Exception handling framework?
exception handling