import java.util.ArrayList;
import java.util.Collections;
public class Main {
public static void main(String[] args) {
ArrayList arrayList = new ArrayList();
arrayList.add("A");
arrayList.add("B");
arrayList.add("D");
System.out.println(arrayList);
Collections.fill(arrayList, "REPLACED");
System.out.println(arrayList);
}
}
/*
[A, B, D]
[REPLACED, REPLACED, REPLACED]
*/