mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
11 lines
256 B
Java
11 lines
256 B
Java
// "Collapse loop with stream 'reduce()'" "true-preview"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public void testBitwiseOr() {
|
|
int[] arr = new int[]{1, 2, 3, 4};
|
|
int acc = 12443;
|
|
acc |= Arrays.stream(arr).reduce(0, (a, b) -> a | b);
|
|
}
|
|
} |