Java IntStream get min value

Description

Java IntStream get min value


import java.util.stream.IntStream;

public class Main {
  public static void main(String[] args) {
    int[] values = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0};

    IntStream intStream = IntStream.of(values);

    System.out.printf("Min: %d%n", intStream.min().getAsInt());

  }/*from   w w  w  .j  ava2  s.  co m*/
}



PreviousNext

Related