RaviNada Kiran wrote:I have made a ArrayList al , with 3 Objects in it .
second i made an ArrayList by cloning the first one that is al.
when i make any changes onto the second ArrayList (Obtained from the clone) .
The changes are not reflecting , why so (As i read that the clone() will produce only a shallow copy)
higherzl Harez wrote:if and only if the Objects you added into is String
if not , the changes you made to the second ArrayList's elements, the first ArrayList changed too.