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 {
    static int randomNumber(int first, int second) {
        Random r = new Random();
        int bigger = Math.max(first, second);
        int smaller = Math.min(first, second);
        return r.nextInt(bigger - smaller + 1) + smaller;
    }
}