DoubleStream empty() example
Description
DoubleStream empty()
returns an empty sequential DoubleStream.
Syntax
empty
has the following syntax.
static DoubleStream empty()
Example
The following example shows how to use empty
.
import java.util.stream.DoubleStream;
/* w w w . j a va2s . c o m*/
public class Main {
public static void main(String[] args) {
DoubleStream i = DoubleStream.empty();
System.out.println(i.count());
}
}
The code above generates the following result.