Java Private Field Visibility

后端 未结 6 571
轻奢々
轻奢々 2020-12-14 10:05

So I was making a class the other day and used Eclipse\'s method to create the equals method when I realized that it generated the following working code:

6条回答
  •  独厮守ぢ
    2020-12-14 10:38

    You are referencing it from within the same class. Thus, you know what you are doing and does not need to be protected from yourself.

提交回复
热议问题