IntStream builder() in Java
IntStream builder() returns a builder for an IntStream.
static IntStream.Builder builder()
- IntStream.Builder : A mutable builder for an IntStream. A stream builder has a lifecycle, which starts in a building phase, during which elements can be added, and then transitions to a built phase, after which elements may not be added.
Return Value : The function returns a builder for an IntStream.
Example 1 :
Example 2 :
-1 0 2 4 7