Inner Classes
We have discussed access modifiers, exceptions, features of Java 8 in previous Java related posts. We will discuss ‘Inner classes’ which is a part of SCJP/OCJP exam objective in this post. Inner classes are part of the code that often stumps a person who is taking the SCJP/OCJP exam. Definition of Inner classes: Inner classes are classes which are nested within the outer classes. Why is this done? This is done to promote good object oriented design principles. According to the Oracle documentation website, inner classes promote: “Encapsulation Readable and maintainable code Logical grouping of classes which is used only […]
