▶super : 부모 클래스의 멤버에 접근 할 수 있는 인스턴스
▶super() : 부모클래스의 생성자함수
Point pt = new Point(); ->여기서 pt와 같은 역할
pt.disp();
'JAVA > 12_inheritance' 카테고리의 다른 글
자식클래스 extends 부모클래스 - 자식클래스는 부모 클래스를 상속받는다 / 부모클래스는 자식클래스에게 상속한다 (0) | 2021.03.07 |
---|---|
super instance로 sub class 객체 생성 가능, super instance = new sub() (0) | 2021.03.07 |
override, toString() (0) | 2021.01.21 |
inheritance - private와protected,super,input,this.r과setR(),생성자 (0) | 2021.01.21 |
super()와 this() 모두 생성자 맨앞에 위치해야 한다 (0) | 2021.01.20 |