Java tutorial
import java.util.Collections; import java.util.Iterator; import java.util.LinkedList; import java.util.List; public class Main { public static void main(String[] args) { String[] coins = { "A", "B", "C", "D", "E" }; List src = new LinkedList(); for (int i = 0; i < coins.length; i++) { src.add(coins[i]); } System.out.println(src); Collections.fill(src, "java2s.com"); Iterator liter = src.listIterator(); while (liter.hasNext()) System.out.println(liter.next()); } }