다음 Java 프로그램의 수행 결과는?
interface A {
int a = 1;
public int aa();
}
interface B {
int a = 2;
public int bb();
}
interface C extends A, B {
int a = 3;
public int cc();
}
class D implements C {
public int aa() { return (5); }
public int bb() { return (6); }
public int cc() { return (7); }
}
class iTest {
public static void main(String args[]) {
A da = new D();
C dc = new D();
D dd = new D();
System.out.println(da.a + dc.a + dd.a + dd.cc());
}
}- ①10
- ②13
- ③14
- ④16
선지를 골라 바로 채점해 보세요.
정답 ③
출처: 인사혁신처 공개 기출(공공데이터포털, 이용허락 제한 없음)