QuesHub > 包中 > 成员 > 类中 > ASK DETAIL

What is private in Java?

Lucas Gonzales | 2023-05-05 14:09:52 | page views:1047
I'll answer
Earn 20 gold coins for an accepted answer.20 Earn 20 gold coins for an accepted answer.
40more

Maya Lewis

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

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.
ask:3,asku:1,askr:137,askz:21,askd:152,RedisW:0askR:3,askD:0 mz:hit,askU:0,askT:0askA:4