This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
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"
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Runtime Exception vs. Exception
Similar Threads
method overriding
Is it "Exception at runtime" or "Compile Fails" for this one?
Exam Lab Question
Java ranch rules roundup