So I’m doing an exercise trying to find how many numbers in an array have even digits. Here is my solution in JavaScript

```
/**
* @param {number[]} nums
* @return {number}
*/
var findNumbers = function(nums) {
ans = nums.reduce((evenCount,val) => {
return ((Array.from(String(val)).length) % 2 === 0)? ++evenCount: evenCount;
},0);
return ans;
};
```

That seems to run fine. But then I try to do the same thing in Java

```
class Solution {
public int findNumbers(int[] nums) {
int ans = nums.stream().reduce(
(numEven, current) -> {
return (String(current).length()%2 == 0) ?
++numEven : numEven;
},0);
return ans;
}
}
```

I’m getting a "can’t find symbol `reduce`

" error. What am I doing wrong? My goal here is to understand how to use reduce in Java not have a better algorithm for calculating even digits.