정보처리기사 실기 · 2025년 1회 · 20번

Q.202025년1회10과목 · Java배점 5점
아래 코드의 출력값을 작성하시오.
public static void main(String[] args) {
    int a = 5, b = 0;
    try {
        System.out.print(a / b);
    } catch(ArithmeticException e) {
        System.out.print("출력1");
    } catch(ArrayIndexOutOfBoundsException e) {
        System.out.print("출력2");
    } catch(NumberFormatException e) {
        System.out.print("출력3");
    } catch(Exception e) {
        System.out.print("출력4");
    } finally {
        System.out.print("출력5");
    }
}

이 문제는 풀이 화면에서 직접 실행해 풀 수 있어요.

이 회차 문제 풀어보기 →정보처리기사 실기 더 풀기