Handling RuntimeExceptions in Java

exception, java, runtimeexception

Solution

It doesn't differ from handling a regular exception:

try {
   someMethodThatThrowsRuntimeException();
} catch (RuntimeException ex) {
   // do something with the runtime exception
}

Problem

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

Original source