`
蔡鹏兴
  • 浏览: 5382 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

this、super区别

阅读更多

1.this:当前类内使用方法或者属性的引用,this只能在类中的非静态方法中使用,静态方法和静态的代码块(static、final)绝对不能出现this。

2.super:对父类方法或者属性进行调引用。

 

区别俩者之间范围,应该不难理解。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics