thufir wrote:
>> public Guest newGuest(int row){
>> name = new Name(GUEST_DATA[row]);
>> contactInfo = new ContactInfo(GUEST_DATA[row]); //
>> totally redundant
>> address = new Address(ADDRESS_DATA[row]);
>> Guest guest = new Guest(name,contactInfo,address);
>> return guest;
>> }
>>
>> I swear that I'd tried to pass a row before and it didn't work, but,
>> anyhow, now it does :)
The trick is to have a constructor that takes a String [] as a parameter.
voorth wrote:
> Try
> java.util.Arrays.toString(data)
>
> This will transform {"A", "B", "C"} to "[A, B, C]"
This is completely not going to help. Then the constructor would have to
parse the String, instead of directly accessing the array elements.
--
Lew


|