mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-02 03:07:47 +07:00
18 lines
394 B
Java
18 lines
394 B
Java
// "Replace Stream API chain with loop" "true"
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
private static Integer test(List<Integer> numbers) {
|
|
Integer acc = 0;
|
|
for (Integer number : numbers) {
|
|
acc = Math.max(acc, number);
|
|
}
|
|
return acc;
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
test(Arrays.asList("a", "b", "xyz"));
|
|
}
|
|
} |