What does the “private” modifier do?

前端 未结 13 987
予麋鹿
予麋鹿 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 08:06

    For completenes. And some people actually prefer to be explicit in their code about the access modifiers on their methods.

提交回复
热议问题