yhemusa
0
Q:

how to copy list item to another list in java

List<Integer> source = Arrays.asList(1,2,3);
List<Integer> dest = Arrays.asList(4,5,6);
Collections.copy(dest, source);
0
List<Integer> copy = new ArrayList<>();
copy.addAll(list);
0

New to Communities?

Join the community