Example usage for java.util.stream LongStream toArray

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

Introduction

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

Prototype

long[] 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) {
    LongStream b = LongStream.of(1L, 1L, Long.MAX_VALUE, Long.MIN_VALUE);

    long[] l = b.toArray();
    for (long v : l) {
        System.out.println(v);/*  w ww .j a  va2 s .  c  o  m*/
    }
}