What does the “private” modifier do?

前端 未结 13 986
予麋鹿
予麋鹿 2021-01-17 07:24

Considering \"private\" is the default access modifier for class Members, why is the keyword even needed?

13条回答
  •  滥情空心
    2021-01-17 07:56

    Using private explicitly signals your intention and leaves clues for others who will support your code ;)

提交回复
热议问题