Exceptions and exception handling

suggest change

Introduction

Objects of type Throwable and its subtypes can be sent up the stack with the throw keyword and caught with try…catch statements.

Syntax

try {
    someMethod();
} catch (SomeException e) {
    System.out.println("SomeException was thrown!");
} finally {
    // runs when control leaves try/catch
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents