File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Runtime Exception vs. Exception" Watch "Runtime Exception vs. Exception" New topic

Runtime Exception vs. Exception

Mike Shn
Ranch Hand

Joined: May 26, 2001
Posts: 149
What is differnce between Runtime Exception and Exception?
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"
I agree. Here's the link:
subject: Runtime Exception vs. Exception
It's not a secret anymore!