higherzl Harez wrote:if and only if the Objects you added into is String
you must mean immutable. Integer, Long and any other immutable objects behave the same as String - once created they can never change.
if not , the changes you made to the second ArrayList's elements, the first ArrayList changed too.
Technically the ArrayList itself does not change, but its contents change. You are most definitely right about that.
An example: