Java之 Exception

Java 的 exception 可以分为两种:

1. 可以预知会发生的异常。( Checked Exception
2. 不可以预知的异常。(运行时异常,又叫: Runtime Exception


对于 1 产生时的处理,要么处理,要么不处理。

处理用 try{ }catch(){  } 语句块
不处理,直接抛出,使用:throws


--------------------------------------------------------------------

下面看结构图:




























-

猜你喜欢

转载自lixh1986.iteye.com/blog/2341924