+ 2
Can we use it like this? Why or why not?
2 ответов
+ 3
You cannot keep a top level class as static in Java but you can keep a class static if it is inside another class. This is useful because then you don't have to create an instance of the top level class to access the methods of the inner class.
+ 1
Well we can declare classes static.