aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes sub types of Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "sub types of Exception" Watch "sub types of Exception" New topic
Author

sub types of Exception

Karu Raj
Ranch Hand

Joined: Aug 31, 2005
Posts: 481
Hi

I want to know which are the subtypes of Runtime exception and Error

also wants to know which are the subtypes of Exception

please let me know
Niranjan Deshpande
Ranch Hand

Joined: Oct 16, 2005
Posts: 1277
erfer the jdl documentation

u may download it from the sun's website


SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
Raghusham Sankargal
Ranch Hand

Joined: Oct 10, 2005
Posts: 59
Hello Karthik,
I cannot give all the exceptions, but yes I can explain the heirarchy a bit. Hope this helps you.


Raghusham Sankargal
Raghusham Sankargal
Ranch Hand

Joined: Oct 10, 2005
Posts: 59
Continued from my previous message

1.The top class is "Throwable".
2. It has two subclasses "Error" and "Exception".
3. "Error" deals with internal errors.
4. "Exception" has one important subclass "RunTimeException".
5. Many of the exceptions that are thrown because of programming errors throws "RunTimeException" (as the name itself indicates).
6. RunTimeExceptions are also known as unchecked exceptions. Ofcourse Exceptions of type "Throwable" and "Exception" are also unchecked.
7. All the functions that you get for an exception object are written in class "Throwable" (w.r.t java 1.4)
8. Its children has only the constructors defined for it.(w.r.t java 1.4)


Hope this little bit theory helps you.
Raghu
Sham
Karu Raj
Ranch Hand

Joined: Aug 31, 2005
Posts: 481
Hi thanks for explanation

where can i find the subtypes of expections and runtime expections

because i want to remember what are the subtypes of runtimeexpection which are UNCHECKED expections
Raghusham Sankargal
Ranch Hand

Joined: Oct 10, 2005
Posts: 59
Hello,
One way is the documentation of sun for Java. That is the best. I think The complete reference book written by Herbert Schildt has a bit more on exceptions. Please check it out. I have the documentation. I am telling you one more time, that is the best not only for this but for any doubts.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sub types of Exception