I have a method which takes a list of integer as parameter. I currently have a list of long and want to convert it to a list of integer so I wrote :
List<Integer> student =
studentLong.stream()
.map(Integer::valueOf)
.collect(Collectors.toList());
But I received an error:
method "valueOf" can not be resolved.
Is it actually possible to convert a list of long to a list of integer?