OOP | this & super
Published in
1 min readAug 3, 2018
“this”
is keyword to call Attribute and Method of Class
syntax : this.ชื่อ Attribute
this จะเรียกในคลาสลูกก่อน หากคลาสลูกไม่มีจะไปเรียกในคลาสแม่เลย
“this” กับ constructor
syntax : this(parameter list);
“super”
syntax : super.ชื่อ attribute
Super จะเรียกในคลาสแม่เลย