I\'m trying to make a List from a primitive array
int[] values={4,5,2,3,42,60,20}; List greaterThan4 = Arrays.stream(values) .filter(v
You're using an array of primitives for one thing, not Integer. I suggest you use Arrays.asList(T...) like
Integer
Integer[] values={4,5,2,3,42,60,20}; List al = new ArrayList<>(Arrays.asList(values));