다음 Java 언어로 작성한 프로그램의 실행 결과는? public class Test { public static void main(String[] args) { int ar[] = {10, 20, 30, 40, 50}; int sum = 0, a = 100, b = 0; try { for(int i = 0; i < ar.length; i++) { sum += ar[i]; } System.out.println(sum); } catch (ArrayIndexOutOfBoundsException e) { System.out.println("Array Index Out Of Bounds Exception"); } try { float z = a / b; System.out.println(z); } catch (ArithmeticException e) { System.out.println("Arithmetic Exception"); } } }
정답 3번150 Arithmetic Exception
해설
참고 자료 보기인사혁신처 공식 최종정답은 3번입니다. 공식 해설은 별도로 제공되지 않았습니다.
오답 포인트
‘다음 Java 언어로 작성한 프로그램의 실행 결과는? public class Test { public s…’의 판단 기준은 ‘150 Arithmetic Exception’입니다. 정답 문구와 해설의 조건을 함께 연결해 기억하세요.
공식 문제지와 최종정답을 문항별로 대조한 기출문제입니다. 공식 해설이 제공되지 않은 문항은 정답 근거만 표시합니다.