this和super关键字

this

this关键字代表当前的对象,this.属性代表当前对象的属性,this.方法代表当前对象的方法。

super

super关键字在对象内部使用,代表父类的对象。访问父类属性,super.属性,访问父类方法super.方法。

posted @ 2016-02-25 20:51  sun_qian  阅读(133)  评论(0编辑  收藏  举报