I am trying the code as follows
int[][] mat = new int[][]{new int[]{2,4,6}, new int[]{8,9,12}};
int oddInAll = Arrays.stream(mat).filter(i -> i%2 != 0).findFirst().getAsInt();
But this gives me the error
| Error: | bad operand types for binary operator '%' | first type: int[] | second type: int | int oddInAll = Arrays.stream(mat).filter(i -> i%2 != 0).findFirst().getAsInt(); |
^---^| Error: | cannot find symbol | symbol: method getAsInt() |
int oddInAll = Arrays.stream(mat).filter(i -> i%2 != 0).findFirst().getAsInt(); |
^-------------------------------------------------------------^
What did I miss this time?