Originally posted by Shiva Mohan:
Hi,
Thanks.I figured that out by myself.Do i need to override toString() for every array element.
for example,displaying myDogs[1]="Clover" data ,do i need to overide one more toString() method that returns Clover.
You need to override toString() in the class Dog, which is exactly what the first reply said. Ex: