Here you can find the source of randomInt(int min, int max)
Parameter | Description |
---|---|
min | a parameter |
max | a parameter |
public static int randomInt(int min, int max)
//package com.java2s; //License from project: Apache License public class Main { /**/*from w w w. ja v a 2 s . c om*/ * @param min * @param max * @return * @return int */ public static int randomInt(int min, int max) { return (int) (min + Math.random() * (max - min)); } }