Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.Random;

public class Main {
    private static Random random = new Random();

    static int nextInt(int a, int b) {
        return Math.min(a, b) + random.nextInt(Math.abs(a - b));
    }

    static int nextInt(int a) {
        return random.nextInt(a);
    }
}