Returns an infinite sequential ordered IntStream produced by iterative application of the provided IntUnaryOperator. The seed is the initial element of the iteration.
Examples
package com.logicbig.example.intstream;
import java.util.stream.IntStream;
public class IterateExample {
public static void main(String... args) { IntStream stream = IntStream.iterate(10, i -> i + 5) .limit(5); stream.forEach(System.out::println); } }