I created an array and trying to use streams for finding the first odd number as follows:
int[] arr = new int[]{2, 4, 6, 8, 9, 12};
int oddOne = Stream.of(arr).filter(i -> i % 2 != 0).findFirst().get();
// fails above
Error: | incompatible types: int[] cannot be converted to int
What am I doing wrong? How do I fix this?