IntStream builder()
returns a builder for an IntStream.
builder
has the following syntax.
static IntStream.Builder builder()
The following example shows how to use builder
.
import java.util.stream.IntStream; public class Main { public static void main(String[] args) { IntStream i = IntStream.builder().add(0).build(); i.forEach(System.out::println); } }
The code above generates the following result.