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

Can nested class be protected?

Nested classes that are declared static are called static nested classes. A nested class is a member of its enclosing class. … Static nested classes do not have access to other members of the enclosing class. As a member of the OuterClass , a nested class can be declared private , public , protected , or package private .

Read more