import java.util.ArrayList; import java.util.Collections; import java.util.List; public class MainClass { public static void main(String[] a) { List list = new ArrayList(10); Object anObject = "A"; list.add("N"); Collections.fill(list, anObject); System.out.println(list); System.out.println(list.size()); } }
[A] 1