Re: ArrayList.toString versus iterating through the ArrayList
by thufir <hawat.thufir@[EMAIL PROTECTED]
>
Apr 20, 2008 at 08:38 PM
On Sun, 20 Apr 2008 10:39:47 +0000, Roedy Green wrote:
> For this to make any sense, your Guest class needs a toString method to
> display something interesting. Otherwise all you get is the default
> Guest.toString = Object.toString which is just the debugging address of
> the object, not very useful.
Guest.toString is overridden to output attributes. Guest is actually
composed of:
Address
ContactInfo
and it's the attributes of those classes which are ultimately sent to the
command line (standard I/O?).
How would you write the above more succinctly?
-Thufir