I am trying to get max number among List of Strings.
My code is:
List<String> list = new ArrayList<String>();
list.add("00657");
list.add("00632");
list.add("00656");
list.add("01125");
Integer maxNum = list.stream()
.mapToInt(Integer::intValue)
.max();
Above code is giving an error. Error is: Uncompilable source code - Erroneous sym type: java.util.stream.Stream.mapToInt.max.
I should get 1125 as a result. I tried different ways but none of them is working.