I get the above error. Relevant code fragment is included below:
// An inner class.
private class ListCommand{
public void process(Items items, Device device){
Item[] list=items.list();
// Error here. A call to helper method below, not to
object's toString(). Why?
String reply=toString(list);
device.write(reply);
}
}
// A helper method.
private String toString(Item[] list) {
String build = "";
for(int i=0; i < list.length; i++){
build += "Index:"+i+" Element:"+list[i]+"\n";
}
return build;
}
Thank you
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---