Browsing tag: java static class

java static nested class, static inner class.

Avoid Package with One class By Static Nested Class


In the previous post, we discussed on inner class for “one and only for” relationship among the classes. But static nested class not for same purpose, it is to add namespace to the class.  It can be instantiated just with top class name (without top class instance).  Static nested class is class scoped within another.