title: Creating a copy of a TreeSet or any Collections for that matter
body: <p>I have a treeSet of custom objects. Each custom object is made up of int a, int b, String c and double d. Lets say I have a treeSet object t1 containing 10 such custom objects. I also have another TreeSet object t2 which is empty. what is the best way of copying the objects in treeset t1 into treeset t2... I want new objects in t2 and not just refernces to the ones in t1.one way is to create 10 new objects in t2 and copy the values of all the a's and b's and c's and d's of each of the 10 objects in t1 to those in t2. Any better way?</p>