Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

class level access  RSS feed

 
Ravee Bhat
Ranch Hand
Posts: 72
Eclipse IDE Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I know having the flower brackets around vector declaration does'nt make any sense.(or does it?! in some particular case!!). Anyway the aVector is not visible inside aMethod. How does one describe this behaviour?
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In this
is a member initialization block and any variables (aVector)declared inside it are not visible after the block is exited.
In this:

The effect of the member initialization block is to initialize the member variable aVector, and its effects are visible after the block is exited.
[ March 29, 2003: Message edited by: Barry Gaunt ]
[ March 29, 2003: Message edited by: Barry Gaunt ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!