edmund_mitchell
asked on
newbie visibility question
Hello all
I have a class Fred. A Fred object has a property a and a public boolean method b().
I also have a class Barney, which is very important to a lot of other classes. Barney's main data object is an array of Fred objects:
public Fred[][] fredArray = new Fred[8][8];
Lots of other classes need to access this array of Fred objects.
One of them, class Wilma, wants to say something like:
boolean wilmaBool = fredArray[x][y].b()
What verbiage needs to be at the top of which classes to make this happen?
I mean, I probably need stuff like import or maybe package at the top of some/all of these classes, but I'm a bit lost as to what goes where.
Thanks for your help,
Edmund
I have a class Fred. A Fred object has a property a and a public boolean method b().
I also have a class Barney, which is very important to a lot of other classes. Barney's main data object is an array of Fred objects:
public Fred[][] fredArray = new Fred[8][8];
Lots of other classes need to access this array of Fred objects.
One of them, class Wilma, wants to say something like:
boolean wilmaBool = fredArray[x][y].b()
What verbiage needs to be at the top of which classes to make this happen?
I mean, I probably need stuff like import or maybe package at the top of some/all of these classes, but I'm a bit lost as to what goes where.
Thanks for your help,
Edmund
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
expertmb is right
What sort of a proposed answer is that???
what is this vogen?
you can post comment and dont propose somebody's comment as proposed answer.
mb...
you can post comment and dont propose somebody's comment as proposed answer.
mb...
ASKER
A vote of confidence in someone else's response is not an answer.
ASKER
Thanks
Edmund
Edmund
Hope it helps.