How can I clone an ArrayList and also clone its items in Java?
ArrayList
For example I have:
ArrayList dogs = getDogs(); ArrayList
Simple way is
ArrayList dogs = getDogs(); ArrayList clonedList = new ArrayList(dogs);