I have one ArrayList
of 10 String
s. How do I update the index 5
with another String
value?
Let arrList
be the ArrayList
and newValue
the new String
, then just do:
arrList.set(5, newValue);
This can be found in the java api reference here.