Java: how to clone ArrayList but also clone its items?
- by palig
Hello,
How can I clone Array List but also clone its items in Java 1.5?
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.
Thanks for any answer!