Java Exception

Introduction

When an error occurs within a method, the method would create an object and handle it in the runtime system.

Image 013

 

Checked Exception

All exceptions are checked exception except for RuntimeException and Error.

 

Unchecked Exception

There are two types of unchecked exception. Error is irrecoverable situation that can not handled by program while RuntimeException is recoverable problem that not checked at compile-time but it occur at runtime.

  • RuntimeException
  • Error

 

Reference

https://docs.oracle.com/javase/tutorial/essential/exceptions/index.html

Leave a comment