ALL
static nested and non-static nested class in Java
Nested classes are divided into two categories: static and non-static(inner). Nested classes that are declared static are simply called static nested classes. Non-static nested classes are called inner classes.Static class can be defined as :class OuterClass{ static class StaticNestedClass{ //OTHER STUFF }}Static nested classes are accessed using the enclosing class name:OuterClass.StaticNestedClassFor example, to create an object for the static nested class, use this syntax:OuterClass.StaticNestedClass nestedObject =new OuterClass.StaticNestedClass();The creation of an instance o...
4,563 0 JAVA STATIC NESTED CLASS INNER CLASS