java how to create a copy of a list code example
Example 1: java copy list
List<Object> copy = new ArrayList<>(original_list);
Example 2: how to copy list item to another list in java
List<Integer> copy = new ArrayList<>();
copy.addAll(list);
List<Object> copy = new ArrayList<>(original_list);
List<Integer> copy = new ArrayList<>();
copy.addAll(list);