jQuery in Action, 2nd edition
The moose likes Mock Exam Errata and the fly likes Roundup #232 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Mock Exam Errata
Reply Bookmark "Roundup #232" Watch "Roundup #232" New topic
Author

Roundup #232

Rob Acraman
Ranch Hand

Joined: Dec 03, 2000
Posts: 89
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.
Rob Acraman
Ranch Hand

Joined: Dec 03, 2000
Posts: 89
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...!!
 
 
subject: Roundup #232
 
Threads others viewed
Two questions from Java rule roundup
incorrect question in roundup
Quirk in Rule Round-up and comment
Java Rule Round-up Question 136
inner classes see everything?
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com