Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about Table 1.2 Page 33 in OCP Study Guide (Sybex)  RSS feed

 
Thomas Roth
Greenhorn
Posts: 10
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question about the table on page 33.

In the first column for "Member inner class" it says "Can access local variables of enclosing class" -> No

Is this right ? Because if i understand it right i would say it can access.

For example the inner class can access "bla" which is a local variable:

 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 37261
519
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
N/A probably would have been a clearer answer.  In your example, test is an instance variable of the containing class and bla is an instance variable of the inner class.  Neither is a local variable.
 
Thomas Roth
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see, thank you.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!