Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/streamApiMigration/reduce/afterAnd.java
2022-12-23 13:26:29 +00:00

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);
}
}