Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class level access

 
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic