public static void main(String[] args) {
changeObject();
changeString();
}
private static void changeString() {
List<String> l = new ArrayList<String>();
String a = "SS";
l.add(a);
System.out.println(l.get(0));
a = "zzz";
System.out.println(l.get(0));
}
private static void changeObject() {
List<SerializableBean> l = new ArrayList<SerializableBean>();
SerializableBean e = new SerializableBean();
e.setTest("SS");
l.add(e);
System.out.println(l.get(0).getTest());