// "Replace iteration with bulk 'Collection.addAll()' call" "true-preview" import java.util.*; public class Collect { class Person {} void collectNames(List persons){ List names = new ArrayList<>(); for (Person person : persons) { names.add(person); } } }