Java LongStream create from long array

Description

Java LongStream create from long array

import java.util.Arrays;
import java.util.stream.LongStream;

public class Main {
  public static void main(String[] argv) throws Exception {
     LongStream numbers  = Arrays.stream(new long[]{1L, 2L, 3L, 4L, 5L, 6L});
     numbers.forEach(System.out::println);
  }//www  . j  a v a2 s  .  com
}



PreviousNext

Related