[정보처리기사] 실기 프로그래밍언어 3문제 (28)
1️⃣ [JAVA]2024.2회다음 Java로 구현된 프로그램을 분석하여 그 실행 결과를 쓰시오.interface Number { int sum(int[] a, boolean odd);}public class Main { public static void main(String[] args) { int a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9}; OENumber OE = new OENumber(); System.out.print(OE.sum(a, true) + ", " + OE.sum(a, false)); }}class OENumber implements Number { public int sum(int[] a, boolean odd) { int result = 0; for(in..
2024. 10. 12.