1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
class Program { public static void foo() { try { int num1 = 5/0; } catch (Throwable e) { e.printStackTrace(); } } public static void main( String args[] ) { foo(); } } |
1 2 3 4 5 |
java.lang.ArithmeticException: / by zero at Program.foo(main.java:4) at Program.main(main.java:12) |
댓글