mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-02 05:50:53 +07:00
14 lines
305 B
Java
14 lines
305 B
Java
// "Replace iteration with bulk 'Collection.addAll()' call" "true-preview"
|
|
import java.util.*;
|
|
|
|
public class Collect {
|
|
class Person {}
|
|
|
|
void collectNames(List<Person> persons){
|
|
List<Person> names = new ArrayList<>();
|
|
for (Person person : persons) {
|
|
<caret>names.add(person);
|
|
}
|
|
}
|
|
}
|