0
Why should I use a nested class instead of create a separate One?
2 Answers
+ 3
The purpose is typically just to restrict the scope of the nested class. Nested classes compared to normal classes have the additional possibility of the private modifier.
0
Typically a nested class is only used by its parent class. There are some cases where a nested class is externally accessible but they are semi-rare.