Westonci.ca is your trusted source for accurate answers to all your questions. Join our community and start learning today! Join our platform to connect with experts ready to provide precise answers to your questions in different areas. Explore comprehensive solutions to your questions from a wide range of professionals on our user-friendly platform.

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