i compiles and ran the TestGeneric1 program and got the folllowing errors:
-------------------------------------------------------------------------------------------
C:\Documents\Jcreator FIles\TestGeneric1.java:55: inconvertible types
found : java.util.List<capture#955 of ? super Horse1>
required: java.util.List<Horse2>
List<Horse2> animalHorse2222=(List<Horse2>) list;
^
C:\Documents\Jcreator FIles\TestGeneric1.java:57: inconvertible types
found : java.util.List<capture#442 of ? super Horse1>
required: java.util.List<Dog1>
List<Dog1> animalDog1111=(List<Dog1>) list;
^
C:\Documents\Jcreator FIles\TestGeneric1.java:59: inconvertible types
found : java.util.List<capture#822 of ? super Horse1>
required: java.util.List<java.lang.String>
List<
String> animalString=(List<String>) list;
-------------------------------------------------------------------------------------------
i have just inserted
import java.util.*;