See the following running example code to get lowest number in a list by using java 8:-
package com.java8.array;
import java.util.Arrays;
import java.util.List;
import java.util.NoSuchElementException;
public class LowestNumberInList {
public static void main(String[] args) {
List<Integer> integers = Arrays.asList(83, 4, 56, 7, 89, 10);
Integer max = integers.stream()
.mapToInt(v -> v)
.min().
orElseThrow(NoSuchElementException::new);
System.out.println("Minimum Interger value: "+max);
}
}
Output:-
Minimum Interger value: 4