java add list to another list code example Example: java add a list to a list List mylist.addAll(secondList);