Below are the differences between this() and super()
Point of Distinction | this() | super() |
---|---|---|
Represent which instance | Represent the current instance of a class | Represent the current instance of parent/base class |
Call which constructor | Used to call constructor of the same class | Used to call constructor of parent/base class |
Access which method | Used to access method of current class | Used to access method of parent class |
Point to which instance | Used to point instance of current class | Used to point instance of superclass |