JAVA 8 || The operator % is undefined for the argument type(s) int[], int

54 Views Asked by At

Can anyone help me to find the root cause why I am getting these below error ? The operator % is undefined for the argument type(s) int[], int

Code Snippet :

int arr1[] = {1,2,3,4,5,6,7};
Stream.of(arr1).filter(num -> (num % 2) == 0).skip(1).limit(1).forEach(System.out::println);

IDE highlighting error in code snippet

0

There are 0 best solutions below