package com.chapter3.item31;
/**
- Created by Administrator on 2017/2/23.
- Exception:异常应只用于异常的情况下,它们永远不应该应用到正常的控制流。
*/
public class ExceptionMain {
public static void main(String[] args) {
try {
int i = 0;
while (true) {
throw new NullPointerException();
}
} catch (NullPointerException e) {
System.out.println(e.toString());
return;
} finally {
System.out.println("Print Finally MOudle.");
}
}
}