Java Random Number generateRandomNumber(int min, int max)

Here you can find the source of generateRandomNumber(int min, int max)

Description

generate Random Number

License

Open Source License

Declaration

public static int generateRandomNumber(int min, int max) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int generateRandomNumber(int min, int max) {
        return (int) (min + (Math.random() * ((max - min) + 1)));
    }//w  w  w . jav a  2s . c  o m
}

Related

  1. generateRandomNumb(int randomSize, int range)
  2. generateRandomNumber()
  3. generateRandomnumber(int firstNum, int restNum)
  4. generateRandomNumber(int from, int to)
  5. generateRandomNumber(int length)
  6. generateRandomNumber(int min, int max)
  7. generateRandomNumber(int start, int end)
  8. generateRandomNumberBetween(final int low, final int high)
  9. generateRandomNumericString(int maxLength)