DEV Community

Discussion on: Effective Java! Favor Static Members Classes over Non-Static

Collapse
 
moaxcp profile image
John Mercier

I think another feature of static class is that private members are visible to the outer class. This allows for some convenient uses of a static inner classes. In the case of Builders there is no need to provide getters for the members of the Builder. The constructor of the outer class can access the private member varaibles directly.