我想請問一下 我在看代碼的時候 看到方法只throw exception 但是上層再也沒有處理了 為什么? 提前謝謝大家解答final public class Interceptors { public Interceptors add(Interceptor globalActionInterceptor) { if (globalActionInterceptor == null) { throw new IllegalArgumentException("nterceptor can not be null."); } return this; }
Java里這個throw可以不catch 嗎?
慕絲7291255
2018-07-14 12:10:42