Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.Random;

public class Main {
    private static Random r = new Random();
    private static int count = 0;

    public static int randomNumber(int num) {
        if (count++ > 8) {
            r = new Random();
        }
        return r.nextInt(num);
    }
}