String s = "haha";
ArrayList x = new ArrayList();
x.add(s);
s = "changed";
String y = (String)x.get(0);
System.out.println(y);
---------------------------------output
haha
=================================
just realize this. I thought it is just a reference pointer, but not.