-
Can a class be private or protected in Java?
声明
堆栈 嵌套
Questioner:Emily Campbell 2023-05-05 14:09:55
The most authoritative answer in 2024
-

-
Isabella Wilson——Studied at the University of Tokyo, Lives in Tokyo, Japan.
Since there's no such concept as 'subpackage' or 'package-inheritance' in
Java, declaring
class protected or package-
private would be the same thing. You
can declare nested and inner
classes as
protected or
private, though.
read more >>
About “声明、堆栈、嵌套”,people ask:
QuesHub is a place where questions meet answers, it is more authentic than Quora, but you still need to discern the answers provided by the respondents.