[Bluej-discuss] How to call an accessor mehtod in a different class?
Aryeh Friedman
aryeh.friedman at gmail.com
Sat Nov 17 20:36:45 GMT 2007
First of all this list is not for student questions.... second you
need to wrap the accessor for a inner object with an accessor in the
outer object
On Nov 17, 2007 3:17 PM, Tony Pattison <tony_pattison at yahoo.co.uk> wrote:
> 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
>
>
> _______________________________________________
> mailing list bluej-discuss at bluej.org
> To unsubscribe or change your preferences, go to
> http://lists.bluej.org/mailman/listinfo/bluej-discuss
>
More information about the bluej-discuss
mailing list