IntStream empty()
returns an empty sequential IntStream.
empty
has the following syntax.
static IntStream empty()
The following example shows how to use empty
.
import java.util.stream.IntStream; public class Main { public static void main(String[] args) { IntStream i = IntStream.empty(); System.out.println(i.count()); } }
The code above generates the following result.