List<Integer> () { <error descr="Cannot infer type: 'var' on variable without initializer">var</error> listOfInteger; Integer[] arrayOfInteger = {2, 4, 8}; listOfInteger = Arrays.stream(arrayOfInteger) .filter(number -> number >= 4) .collect(Collectors.toCollection(ArrayList::new)); return listOfInteger; }