how to add to replace values in arrays java code example Example: modify element in list java list.set( 2, "New" );