• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sub types of Exception

 
Karu Raj
Ranch Hand
Posts: 481
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
erfer the jdl documentation

u may download it from the sun's website
 
Raghusham Sankargal
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Karthik,
I cannot give all the exceptions, but yes I can explain the heirarchy a bit. Hope this helps you.
 
Raghusham Sankargal
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 481
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic