Is it necessary to declare an inner class private?If it is then plz specify the reason why is it necessary to declare an inner class private?
An inner class is nothing but a member of its enclosing class. Any member of class can be declated with access modifiers like public, private, protected.
Access modifiers make the member to be visible to others or not
though depending on what you want to use it for it may or may not require the static attribute.
That's the only one that in some cases is dictated.