Which of the following modifiers are used to control access to a class member?

The private modifier specifies that the member can only be accessed in its own class. The protected modifier specifies that the member can only be accessed within its own package (as with package-private) and, in addition, by a subclass of its class in another package.

Sizin İçin Seçtik  Which modifier is used to specify that a method Cannot be used outside a class?

Leave a Reply

Your email address will not be published. Required fields are marked *