wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Runtime Exception vs. Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Runtime Exception vs. Exception" Watch "Runtime Exception vs. Exception" New topic
Author

Runtime Exception vs. Exception

Mike Shn
Ranch Hand

Joined: May 26, 2001
Posts: 149
Hello
What is differnce between Runtime Exception and Exception?
Thanks
Jeremy Thornton
Ranch Hand

Joined: Feb 21, 2002
Posts: 91
Presumably there isn't one as exceptions must occur at run time...
Blake Minghelli
Ranch Hand

Joined: Sep 13, 2002
Posts: 331
A RuntimeException is actually a specific subclass of Exception. You might be thinking of the difference between checked and unchecked exceptions. A RuntimeException (or any subclass of it) is unchecked - meaning that your method does not have to explicitly declare it in it's throws clause or wrap it in a try/catch block.


Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"
 
Consider Paul's rocket mass heater.
 
subject: Runtime Exception vs. Exception