List of usage examples for java.util.stream LongStream generate
public static LongStream generate(LongSupplier s)
From source file:Main.java
public static void main(String[] args) { LongStream b = LongStream.generate(() -> { return 2L; });//from w w w. j ava 2 s .c o m b.limit(10).forEach(System.out::println); }