mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
19 lines
413 B
Java
19 lines
413 B
Java
// "Replace with collect" "false"
|
|
import java.util.*;
|
|
|
|
public class Collect {
|
|
public static void collectWithAnonymous(List<String> test) {
|
|
List<String> result = new ArrayList<>();
|
|
Runnable r = new Runnable() {
|
|
@Override
|
|
public void run() {
|
|
for (String str : te<caret>st) {
|
|
result.add(str.trim());
|
|
}
|
|
}
|
|
};
|
|
r.run();
|
|
System.out.println(result);
|
|
}
|
|
}
|