What is private 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 Cambridge, Lives in London.
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-08 14:09:52
评论(499)
Helpful(122)
Helpful
Helpful(2)

Liam Martinez
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.