📅  最后修改于: 2022-03-11 14:52:37.244000             🧑  作者: Mango
list.set(1,"new value");
//example ..
List list = new ArrayList<>();
list.add("one");
list.add("two");
list.add("three");
System.out.println(list); // [one,two,three]
list.set(1,"new");
System.out.println(list); //[one,new,three]