Exactly. Both List_A and List_B refer to the same address in memory. If you want to make a copy you need to create a new ArrayList and add all elements into it with addAll. After that you may clear List_A.

Although it'll work fine with String in your case, you must understand that new list contains same objects (reference to the same objects), not a copy of them. So if you don't clear listA and change an element of it, that element will also be changed in listB accordingly.

Answer 2

When you create an object and assign a reference to that object to List_A, a memory is allocated for that object and it has some address, say @eae072e. List_A is a reference to that object. When you create a variable List_B and assign to it List_A, they both refer to the same address in memory @eae072e. So when you use one of them to manipulate with data, this manipulation will be reflected in both of them - in List_A and List_B.

I wanted to make a web interface (could be a flash one) that will have some widgets inside and a canvas of selected resolution, I could drag and drop windows onto the canvas and move the object to specific x y coordinatesAfter you finish the layout you save and the Android...