how to add a list in a list java

Java
List<SomePojo> list = new ArrayList<SomePojo>();

List<SomePojo> anotherList = new ArrayList<SomePojo>();
anotherList.add(list);
Source

Also in Java: