📜  为什么要提到一个方法会抛出一些异常? - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:15.248000             🧑  作者: Mango

代码示例1
The throws keyword allows the compiler to help you write code that handles this type of error, but it does not prevent the abnormal termination of the program. With the help of the throws keyword, we can provide information to the caller of the method about the types of exceptions the method might throw.