fork(16) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4. import java.util.Arrays.*;
  5.  
  6. class Ideone
  7. {
  8. public static void main (String[] args) throws java.lang.Exception
  9. {
  10. int[] array = new int[5];
  11. Arrays.setAll(array, i -> i);
  12. System.out.println(Arrays.toString(array));
  13. }
  14. }
Success #stdin #stdout 0.19s 320704KB
stdin
Standard input is empty
stdout
[0, 1, 2, 3, 4]