Java tutorial
//package com.java2s; import java.util.Random; public class Main { public static int RandomNum(int range) { Random random = new Random(); int i = random.nextInt(range); return i; } }