Knute Snortum wrote:To add elements to the list, use the add() method.
Campbell Ritchie wrote:Don't use parseInt along with a Scanner. The Scanner can do all the hard work: look for its nextXXX methods.
Paweł Baczyński wrote:Your list is empty so you won't find anything inside it.
Some points about your code:
You need to fix indentation.
What is setName method supposed to do? It takes four parameters and sets the name of Animal1 to the last one. The rest is ignored.
This is how you usually write a setter:Variable names should begin with lower case.
Campbell Ritchie wrote:
For better to give the sales person class a proper toString method then you can simply writeDylan Stout wrote: . . .
System.out.println(grab);
What a strange name to use, grab.