| Author |
What is the Purpose of Having a Nested Java Class That is Private Static
|
Natalie Kopple
Ranch Hand
Joined: May 06, 2003
Posts: 320
|
|
I understand "private" and "static".
What is the purpose of having a "private static" nested Java class? I have never run into a situation of using it. Please help me in understaning it. Thank you.
|
 |
Martijn Verburg
author
Bartender
Joined: Jun 24, 2003
Posts: 3268
|
|
|
For Utility/Encapsulation purposes. For example the public class may have a private member variable which requires an awful lot of static initialisation that the developer feels belongs 'in a different class', I could see mathematics utilities for example using this technique (but it would be pretty rare).
|
Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
|
 |
 |
|
|
subject: What is the Purpose of Having a Nested Java Class That is Private Static
|
|
|