Namely, without referencing the same object, I need to copy values of elements of one list into another list. These are the lists:
List listA = ne
You can try and give a look at the Collections.copy method:
public static void copy(List dest, List src)
Copies all of the elements from one list into another. After the operation, the index of each copied element in the destination list will be identical to its index in the source list. The destination list must be at least as long as the source list. If it is longer, the remaining elements in the destination list are unaffected. This method runs in linear time.
Parameters: dest - The destination list. src - The source list.
Note: The above should work for simple data types such as Integers, however, if you have your own objects which might in turn reference other objects, you will have to iterate over each object and copy it separately.