What is static inner class in Java?

A static inner class is a nested class which is a static member of the outer class . It can be accessed without instantiating the outer class, using other static members. Just like static members, a static nested class does not have access to the instance variables and methods of the outer class.

Read more

Should static classes be inner?

An inner class, by default, has an implicit reference to an object of the outer class. If you instantiate an object of this from the code of the outer class, this is all done for you. … As a basic rule, if the inner class has no reason to access the outer one, you should make it static by default .

Read more