mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
14 lines
342 B
Java
14 lines
342 B
Java
// "Replace Stream API chain with loop" "true"
|
|
|
|
import java.util.Optional;
|
|
import java.util.stream.Stream;
|
|
|
|
public class Main {
|
|
private static Optional<Integer> test(Integer... numbers) {
|
|
return Stream.of(numbers).redu<caret>ce((a, b) -> a*b);
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
System.out.println(test(1,2,3,4));
|
|
}
|
|
} |