Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Arrays;
import java.util.Random;

public class Main {
    public static void main(String[] args) {

        Random rand = new Random();

        int randnumb;
        int array[] = new int[5];
        for (int j = 0; j <= 4; j++) {
            randnumb = 1 + rand.nextInt(11);
            array[j] = randnumb;
        }
        System.out.println(Arrays.toString(array));

    }
}