dimanche 3 avril 2016

Inheritance Display All Information thought a for loop which array is created by for loop

Inheritance Display All Information thought a for loop which array is created by for loop.

Array was create in a for loop example information[i]

Just looking how to display all information from different locations example person(String name, Sting age), dog(String name)

problem, when trying to display all information on a loop i seem to run into a problem where the information for dog is trying to display age but hits an error. not to sure if i need instanceof to work out the difference but already tired that and nothing seemed to worked. please help me, its a problem i cant seem to fix

Aucun commentaire:

Enregistrer un commentaire