There are four kinds of inner classes: Member classes, Local classes, Anonymous classes, Nested top-level classes and interfaces. With inner class a programmer can design his domain or logic more flexible and easy. It’s not just SCJP exam issue, also it impacts your OOP design inside.

So what are inner classes good for anyway?

Some Insight Into Inner Classes in Java

Ref:
The Essence of OOP using Java, Static Initializer Blocks
The Essence of OOP using Java, Instance Initializers
The Essence of OOP using Java, Member Classes
The Essence of OOP using Java, Local Classes
The Essence of OOP using Java, Anonymous Classes
The Essence of OOP using Java, Nested Top-Level Classes
Here is link.

Advertisements