mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-11 02:39:37 +07:00
17 lines
329 B
Java
17 lines
329 B
Java
// "Replace with collect" "true"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public Set<String> test(String[] array) {
|
|
int count = 0;
|
|
Set<String> set = new HashSet<>();
|
|
for(String str : a<caret>rray) {
|
|
if (str != null) {
|
|
set.add(str);
|
|
if(++count == 10) break;
|
|
}
|
|
}
|
|
return set;
|
|
}
|
|
} |