posted 22 years ago
Lee,
If you are looking for an example of why it is necessary to allow objects of the same class to access one anothers private members, then I think that Frank's example is excellent. If you are looking for a simplistic example that illustrates that objects of the same class can indeed access one another's private methods, then the following might be helpful.
Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>