mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
11 lines
258 B
Java
11 lines
258 B
Java
// "Collapse loop with stream 'reduce()'" "true-preview"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public void testBitwiseAnd() {
|
|
int[] arr = new int[]{1, 2, 3, 4};
|
|
int acc = 12443;
|
|
acc &= Arrays.stream(arr).reduce(-1, (a, b) -> a & b);
|
|
}
|
|
} |