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
This should would work
List testAList = new ArrayList<>(); List testBList = new ArrayList<>() testAList.addAll(new ArrayList<>(testBList));