posted 24 years ago
Hi,
Here is a question and answer from the Rules Round up.
True or False:
A static inner class (considered as a top-level nested class) CANNOT access non-static variables of the outer class.
Answer:
TRUE. A static inner class is treated as a top level nested class and has no reference -- no special relationship -- to any instance of the enclosing class.
I don't quite get the point when they say a static inner class is treated as a top level nested class. From what i understand , a top level nested class is the outermost class in a nested class construct. I understand the point of the static nested class not being able to relate to the instances.