mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-03 07:20:55 +07:00
13 lines
301 B
Java
13 lines
301 B
Java
import java.util.Arrays;
|
|
import java.util.function.Function;
|
|
import java.util.stream.Collectors;
|
|
|
|
class Test {
|
|
|
|
public static void main(String[] args) {
|
|
Arrays.asList("these", "are", "some", "words").stream()
|
|
.collect(Collectors.toMap(Function.identity(), (s) -> 1, Integer::sum));
|
|
}
|
|
|
|
}
|