How can I clone an ArrayList and also clone its items in Java?
ArrayList
For example I have:
ArrayList dogs = getDogs(); ArrayList
List dogs; List copiedDogs = dogs.stream().map(dog -> SerializationUtils.clone(dog)).Collectors.toList());
This will deep copy each dog