Why there is no static class in Java

前端 未结 5 839
死守一世寂寞
死守一世寂寞 2021-01-14 16:52

I am new to java. When I was going through language specification I found that static classes cannot be declared, but we can have static inner classes. I am little confused

5条回答
  •  春和景丽
    2021-01-14 17:41

    Because it doesn't add any meaning. 'static' has a meaning when applied to nested classes. It has no meaning on an outer class. So you can't specify it.

提交回复
热议问题