[Bluej-discuss] How to call an accessor mehtod in a different class?

Tony Pattison tony_pattison at yahoo.co.uk
Sat Nov 17 20:17:06 GMT 2007


If ObjectA has an arraylist of ObjectB, and each ObjectB contains an
instance of ObjectC which in turn contains an instance of ObjectD, and
the class that defined ObjectD has an accessor method getName() . How do
I call that method from within the class that defined ObjectA ?

Calling methods from the class that defined ObjectB is easy, for
instance I enter 'lot.toString()' , but I have yet to find (or stumble
upon) a way of coding the getName() method in this fashion.

Any help would be much appreciated.

Tony
  



More information about the bluej-discuss mailing list