What is meant by protected in Java?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Studied at the University of Toronto, Lives in Mexico City.
A private member is only accessible within the same class as it is declared. A member with no access modifier is only accessible within classes in the same package. A protected member is accessible within all classes in the same package and within subclasses in other packages.
2023-05-10 12:30:23
评论(499)
Helpful(122)
Helpful
Helpful(2)

Sophia Moore
QuesHub.com delivers expert answers and knowledge to you.
A private member is only accessible within the same class as it is declared. A member with no access modifier is only accessible within classes in the same package. A protected member is accessible within all classes in the same package and within subclasses in other packages.