java replace element in list

Java
list.set(4, "element at index 4 is replaced by this string");
Source

Also in Java: