Computer Science, asked by saravanakumarsamy76, 1 month ago

Difference between private & protected in java class ​

Answers

Answered by ItzMonster
1

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.

Explanation:

i hope it's helpful to you

Similar questions