• 코드:
​x
 
1
class Parent {
2
    int a = 10;
3
}
4
​
5
class Child extends Parent {
6
    void display() {
7
        System.out.println(a);
8
        System.out.println(this.a);
9
        System.out.println(super.a);
10
    }
11
}
12
​
13
public class prog {
14
    public static void main(String[] args) {
15
        Child ch = new Child();
16
        ch.display();
17
    }
18
}
표준입력 & 실행옵션