list add list java code example
Example 1: java add a list to a list
List mylist.addAll(secondList);
Example 2: how to add a list in a list java
List list = new ArrayList();
List anotherList = new ArrayList();
anotherList.add(list);
List mylist.addAll(secondList);
List list = new ArrayList();
List anotherList = new ArrayList();
anotherList.add(list);