Hi Sanpan,
In both cases the point of the modifer is to limit the use of the class in some manner. A top-level class that can't be extended (private) or is only available to the same package or subclasses (protected) isn't very useful. It makes more sense to create them as members of the classes that actually use them.
Hope that helps.
Note that JavaRanch has a
Name Policy. Please read the policy and re-register under a name that complies with the rules.
Thanks for your co-operation.
Moving this
thread to Certifcation Study.
------------------
Jane Griscti
Sun Certified
Java 2 Programmer
"When ideas fail, words come in very handy" -- Goethe