Catched Exception / Uncatched Exception

J

Jerry

What is the differences between catched exception and uncatched exception?

Thank a lot!
 
S

Stefan Schulz

What is the differences between catched exception and uncatched exception?

I am a bit confused about this question. Do you mean checked vs. unchecked?

In case you actually mean what you asked, a caught exception is handled in
the catch-block that caught it, while an uncaught is propagated to the
calling method, or possibly to the top level.
 
J

Jerry

Yeah, my question is what is the differences between checked exception
vs. unchecked exception.

Thanks,
 
J

John C. Bollinger

Jerry said:
Yeah, my question is what is the differences between checked exception
vs. unchecked exception.

All Exceptions *except* RuntimeException and its descendants must be
declared by any method that can possibly throw them or allow them to
propagate. These are the "checked exceptions". RuntimeException and
its subclasses are "unchecked exceptions"; they do not need to be
declared by methods that throw them or allow them to propagate. Those
are the basic differences.

(Error and its subclasses are not technically exceptions, but they are
another type of unchecked Throwable.)

Whether a particular application-specific exception class should be
checked or unchecked, and in general whether to use checked or unchecked
exceptions are entirely different and more subjective questions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top