Alex Rivera | Logout

Handling RuntimeExceptions in Java

Asked 2010-01-08T15:50:20.640
20

Can anyone explain how to handle the Runtime Exceptions in Java?

Edit
Report

1 Answer

38

It doesn't differ from handling a regular exception:

try {
   someMethodThatThrowsRuntimeException();
} catch (RuntimeException ex) {
   // do something with the runtime exception
}
answered 2010-01-08T15:51:34.197

Your Answer