简答题

简述this与super关键字的区别。

正确答案

this和super都可以调用类中的属性、方法、构造方法,但是this调用的是本类操作,而super是由子类调用父类操作。

答案解析