Roundup question #232 reads: A non-static inner-class always has free access to ALL member data of its enclosing class. True or False? (emphasis from question) Answer: True. But what about inner-classes-in-methods. They're not static, but can only access final data.
posted 18 years ago
OK, my mistake. Inner-classes-in-methods and anonymous inner classes can access all class variables, but only final method variables. I should have checked up before posting, but I was so SURE...!!
This is my favorite show. And this is my favorite tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop