In a loop, check if you have reached the last element of the array, using size()-1. If you have not reached it, output ", ". Otherwise, output " and ".
In this case an Iterator is not an approritate solution. Iterate through the list using the indices of the elements and then follow Satou's advice. [ February 20, 2006: Message edited by: Garrett Rowe ]
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter