---
title: "Java Exception"
author: "greentiro"
date: "2009-09-07T20:45:45Z"
tags: []
slug: "java-exception"
draft: false
lastmod: "2009-09-07T20:45:45Z"
id: 464294
url: "https://greentiro.iteye.com/blog/464294"
---

程序出错时至少需要做的三件事

- Notify the user of an error;
- Save all work;
- Allow users to gracefully exit the program.

 Eception的分类

- Throwable
  
  - Error
  - Exception
    
    - RuntimeException
    - IOException

RuntimeException

A bad cast;[]()[]()

An out-of-bounds array access;

A null pointer access.