-
Can we define a class as protected in Java?
声明
嵌套 您可以
Questioner:Lucas Kim 2023-05-05 14:10:00
The most authoritative answer in 2024
-

-
Benjamin Wilson——Works at the International Monetary Fund, Lives in Washington, D.C., USA.
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.