Also note the continuing pattern of unchecked exceptions, which keeps the code remarkably concise.
还要注意,这里仍然对异常未加检查,这将使代码异常简洁。
While most of the time, we never intend to throw unchecked exceptions, it does sometimes happen anyway.
虽然大多数时候,我们不会故意抛出未检测异常,但是确实有些时候会发生这种情况。
Instead, you should use unchecked exceptions for such conditions, so that you can optionally handle these conditions.
相反,您应该对此类条件使用未经检查的异常,以便能够可选地处理这些条件。
应用推荐