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;
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,