aspose file tools*
The moose likes Beginning Java and the fly likes explain checked and unchecked exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "explain checked and unchecked exception" Watch "explain checked and unchecked exception" New topic
Author

explain checked and unchecked exception

pandianjava
Greenhorn

Joined: Apr 28, 2001
Posts: 2
please explain above topics
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at "JavaRanch Naming Policy" . We require names to have at least two words (not just letters), separated by a space, and strongly recommend that you use your full real name. We want to get to know you as a Professional. Please choose a new name which meets the requirements and re-register.

Cindy


"JavaRanch, where the deer and the Certified play" - David O'Meara
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

PJ,

The simplest explanation is that checked exceptions are checked for by the compiler... the compiler makes sure that you either put something that will throw these exceptions inside a try...catch block, or that you make the method that contains them propegate the exception upwards. Unchecked exceptions require neither of these and so are not checked for by the compiler. All unchecked exceptions inherit from RuntimeException, so if you look at RuntimeException in the API, you can see a listing of all the "official" unchecked exceptions if you see what extends RuntimeException.

HTH,
-Nate

P.S. - Listen to Cindy and use your real name from now on, please!


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
manish paliwal
Greenhorn

Joined: May 18, 2001
Posts: 16
in simple words checked exception r that exception that r checked by compiler and unchecked exception is checked by runtime
------------------
manish paliwal(or just mann )


manish paliwal(or just mann )
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: explain checked and unchecked exception