For example, lets say you have two classes:
public class TestA {} public class TestB extends TestA{}
I have a method that returns a L
L
casting of generics is not possible, but if you define the list in another way it is possible to store TestB in it:
List extends TestA> myList = new ArrayList();
You still have type checking to do when you are using the objects in the list.