17. 23. 13. public static void fill(List list, Object element): method copies the same object reference to every element of the list
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());
}
}