I have a HashMap from this I get one of the ArrayList's using the following:
ArrayList details = map.get(index);
This works perfectly, but when I use remove on the ArrayList details, it causes the same field to be removed from the HashMap.
I have printed out the values for the HashMap and ArrayList before and after the remove, this shows the data is correctkly removed from the ArrayList, but the HashMap is also affected by this remove.
Why?