Java tutorial
import java.util.Arrays; import java.util.Random; public class Main { public static void main(String[] args) { int[][] array = new int[2][10]; Random rand = new Random(); for (int i = 0; i < 10; i++) { array[0][i] = i; array[1][i] = (int) rand.nextInt(3) + 1; } System.out.println(Arrays.deepToString(array)); } }