how to replace an index in an array list code example Example: modify element in list java list.set( 2, "New" );