Answers for "select max value from list java"

0

select max value from list java

List<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(4);
        list.add(2);
        num = list.stream().mapToInt(Integer::intValue).max().getAsInt();
Posted by: Guest on October-05-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language