We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1d20feb commit f7c3503Copy full SHA for f7c3503
EIP/Java/README.md
@@ -643,3 +643,39 @@
643
```
644
645
- [답] Vehicle name: Spark
646
+
647
+- 문제20. 다음 Java 로 구현된 프로그램을 분석하여 그 실행 결과를 쓰시오. (단, 출력문의 출력 서식을 준수하시오)
648
649
+ ```java
650
+ class Parent {
651
+ int x = 100;
652
+ Parent() {
653
+ this(500);
654
+ }
655
+ Parent(int x) {
656
+ this.x = x;
657
658
+ int getX() {
659
+ return this.x;
660
661
662
663
+ class Child extends Parent {
664
+ int x = 1000;
665
+ Child() {
666
+ this(5000);
667
668
+ Child(int x) {
669
670
671
672
673
+ public class Main {
674
+ public static void main(String[] args) {
675
+ Child obj = new Child();
676
+ System.out.println(obj.getX());
677
678
679
+ ```
680
681
+ - [답] 500
0 commit comments