在方法中始终使用'this'是一种好习惯。即使没有使用与该方法的输入相同的变量名。
String getStory(number) { return this.storyData[number]; }
这样,就不会与任何输入变量名称发生冲突(绝不会)。预先感谢您的反馈。
通常this.仅在对使用哪个变量有歧义时才使用。
this.
class Test{ final int x; Test(this.x); }