Java Arrays create IntStream from int array

Description

Java Arrays create IntStream from int array

import java.util.Arrays;
import java.util.stream.IntStream;

public class Main {
  public static void main(String[] argv) throws Exception {
     IntStream numbers  = Arrays.stream(new int[]{1, 2, 3});
     numbers.forEach(System.out::println);
  }//from  w  w  w  .j ava  2 s  .  c om
}



PreviousNext

Related