Java LongStream create from generator

Description

Java LongStream create from generator


import java.util.stream.LongStream;

public class Main {
  public static void main(String[] args) {
    LongStream.generate(() ->  99)
    .limit(10)//www  . j av  a2s. c om
    .forEach(System.out::println);
  }
}



PreviousNext

Related