728x90
public class ExerciseCh1_6_2{
public static void main(String[] args){
int i = 1, j = 0, k;
try {
System.out.println(“Exception Checking..”);
k = j / j; ==> 예외 발생
System.out.println(“After Exception throwing..”);
} catch (ArithmeticException e) {
System.out.println(“Caught Exception..”);
} finally {
System.out.println(“In the finally statement..”);
}
}
}
반응형