-
Can we have a static class in Java?
声明
嵌套 静态
Questioner:Julian Turner 2023-05-05 14:10:00
The most authoritative answer in 2024
-

-
Harper Davis——Studied at the University of Melbourne, Lives in Melbourne, Australia.
But remember you
can only declare a
static class inside a top-level
class, it is illegal to declare it inside an inner
class. Nested
classes (a
class within a
class) are the only ones that
can be declared
static. This is so the parent
class does not have to be instantiated to access the nested
class.
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.