异常处理

wepay 面经

简单问了下 IllegalArgumentException 和 ArithmeticException 的区别

  1. IllegalArgumentException: check null

  2. ArithmeticException: an integer "divide by zero" throws an instance of this class.

  3. Both extends RuntimeException which is unchecked exception https://docs.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html

Last updated

Was this helpful?