posted 17 years ago
Often, local classes may implement interfaces, in which case they must implement public methods. Likewise in inner class may extend another class (not just another inner class) - in which case, it must use appropriate access modifiers when overriding methods.
It's true that there may be many methods and fields of local classes for which access modifiers are irrelevant. I usually just omit modifiers in this case, rather than typing "public" or "private" and letting the reader wonder what that means. Of course, a default modifier means something too. But the point is, if you need a particular type of modifier, use it, and if it doesn't matter what modifier you use, don't worry about it.
"I'm not back." - Bill Harding, Twister