Example usage for java.util.stream IntStream toArray

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

Introduction

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

Prototype

int[] 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) {
    IntStream i = IntStream.of(6, 5, 7, 1, 2, 3, 3);
    int[] v = i.toArray();
    for (int n : v) {
        System.out.println(n);//  www  .ja v a  2s  . c om
    }
}