DoubleStream spliterator()
returns spliterator for DoubleStream.
spliterator
has the following syntax.
Spliterator.OfDouble spliterator()
The following example shows how to use spliterator
.
import java.util.Spliterator; import java.util.stream.DoubleStream; //from www .java2s.c o m public class Main { public static void main(String[] args) { DoubleStream b = DoubleStream.of(1.1,2.2,3.3,4.4,5.5); Spliterator.OfDouble o = b.spliterator(); System.out.println(o.characteristics()); } }
The code above generates the following result.