2.1.2.封装

2.1.2.封装

修饰符

public
protecd
private

this修饰符

  1. this关键字代表当前对象 this.属性 操作当前对象的属性 this.方法 调用当前对象的方法
  2. 封装对象的属性的时候,经常会使用this关键字