Find the best solutions to your problems with the help of IDNLearn.com's experts. Ask any question and receive comprehensive, well-informed responses from our dedicated team of experts.

What modifier should you use on the members of a class so that they are not accessible to another class in a different package, but are accessible to any subclasses in any package

Sagot :

The private modifier specifies that only other members of the same class can access the member. The protected modifier restricts access to the member to within its own package.

What are public and private modifiers?

The public access modifier permits code from both inside and outside the class to access the class's methods and properties, whereas the private modifier prevents outside code from accessing the class's methods and properties.

Thus, private modifier is the member.

For more details about private modifier, click here

https://brainly.com/question/15108837

#SPJ1