Java tutorial
import java.util.stream.IntStream; public class Main { public static void main(String[] args) { // stream of 1s with Stream.generate IntStream.generate(() -> 1).limit(5).forEach(System.out::println); } }