Hi everyone I am doing homework and I don't understand one part of it.I have implemented it but it is not working as supposed so. It says:
Iterate through the ArrayList of Pizza objects calling the toString() method of each object, adding the return value of the method call plus a newline character to the String called list.
And here is what I have done
for(int i=0; i<myList.size()l i++)
{
//myList is arraylist of type Pizza
list +=myList.toString() + "\n";
}
If anyone can say whether my implementation is correct, it will be great.