Example usage for java.util.stream DoubleStream toArray

List of usage examples for java.util.stream DoubleStream toArray

Introduction

In this page you can find the example usage for java.util.stream DoubleStream toArray.

Prototype

double[] toArray();

Source Link

Document

Returns an array containing the elements of this stream.

Usage

From source file:Main.java

public static void main(String[] args) {
    DoubleStream b = DoubleStream.of(1.1, 2.2, 3.3, 4.4, 5.5);

    double[] array = b.toArray();
    for (double d : array) {
        System.out.println(d);/*w w  w.  ja v a  2  s  .c  om*/
    }
}