How can I clone an ArrayList
and also clone its items in Java?
For example I have:
ArrayList<Dog> dogs = getDogs();
ArrayList<Dog> clonedList = ....something to do with dogs....
And I would expect that objects in clonedList
are not the same as in dogs list.