File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes class level access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "class level access " Watch "class level access " New topic

class level access

Ravee Bhat
Ranch Hand

Joined: Nov 26, 1999
Posts: 72

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

Joined: Aug 03, 2002
Posts: 7729
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 ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
I agree. Here's the link:
subject: class level access
It's not a secret anymore!