What are the variables can the non-static inner classes access? Are they the static variables, final instance variables? What about anonymous class?
posted 15 years ago
Non-static inner classes, not defined inside methods, can access all variables of the top-level class. Non-static inner classes, defined inside methods, can access all variables fo the top-level class, and all final variables of the enclosing method. Bill