This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
What couldn't you see on line #1 and #2. You are passing a list to the method, adding Dog, Cat and Bird objects to it accordingly. Inside the method, you are adding a Dog object to every passed list and after printing its size, you are traversing the list. What do you see wrong there?
Joined: Jul 03, 2007
Sorry all!!. I was using AnimalDoctorGeneric1 instead of AnimalDoctorGeneric2 .It was working fine.