mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
10 lines
238 B
Java
10 lines
238 B
Java
// "Replace with sum()" "true"
|
|
|
|
import java.util.Arrays;
|
|
|
|
public class Main {
|
|
public long test(String[] array) {
|
|
long i = Arrays.stream(array).filter(a -> a.startsWith("xyz")).mapToLong(String::length).sum();
|
|
return i;
|
|
}
|
|
} |