ArrayList and Cloning the Objects inside the ArrayList
I am having two lists say
ArrayList list1,list2
list2 is initiallised as
list2=new ArrayList(list1);
or
list2=list2.addAll(list1);
But when i made any changes in the object in list1 then it is reflected in list2 because same reference.
But i dont need this. I need the lists to be independent of each other.
One routine i know is to add the clone of the objects in list1 to list2. This need some job to be done, such as implementing Cloneable interface and loopings.
Is there any other smartest way to do this?
Regards VELU

