Skip to content

Commit 5a3c835

Browse files
committed
240526 정보처리기사 실기 - Java (2021-2회 19번)
1 parent d75b11f commit 5a3c835

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

EIP/Java/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,32 @@
312312

313313
- [] static
314314

315+
- 문제19. 다음은 Java 프로그램이다. 실행 결과를 쓰시오.
316+
317+
```java
318+
public class over1 {
319+
public static void main(String[] args) {
320+
ovr1 a1 = new ovr1();
321+
ovr2 a2 = new ovr2();
322+
System.out.println(a1.sun(3,2) + a2.sun(3,2));
323+
}
324+
325+
int sun(int x, int y) {
326+
return x + y;
327+
}
328+
}
329+
330+
class ovr2 extends ovr1 {
331+
332+
int sun(int x, int y) {
333+
return x - y + super.sun(x,y);
334+
}
335+
336+
}
337+
```
338+
339+
- [] 11
340+
315341

316342

317343
#### 2022년 3회

0 commit comments

Comments
 (0)