Sometimes, we can deal with exceptions, but they sometimes, we do not have permission to handle an exception. Or, I can not deal with, I do not deal with.
In order to solve the wrong problem, java view of this situation, it provides another treatment program: thrown.
format:
throws 异常类名
注意:这个格式必须跟在方法的括号后面
note:
尽量不要在main方法上抛出异常
summary:
编译器异常抛出,将来调用者必须处理。
运行期异常抛出,将来调用可以不用处理。