fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. List<int[]> list = List.of(
  13. new int[] {7, 0},
  14. new int[] {7, 1},
  15. new int[] {6, 1},
  16. new int[] {5, 0},
  17. new int[] {5, 2},
  18. new int[] {4, 4}
  19. );
  20. int[][] res = list.stream().toArray( int[][]::new );
  21.  
  22. System.out.println( Arrays.deepToString(res) );
  23. }
  24. }
Success #stdin #stdout 0.1s 33788KB
stdin
Standard input is empty
stdout
[[7, 0], [7, 1], [6, 1], [5, 0], [5, 2], [4, 4]]