Here you can find the source of getRandomNumber()
public static int getRandomNumber()
//package com.java2s; import java.util.Random; public class Main { public static int getRandomNumber() { Random rand = new Random(); int min = 1; int max = 32768; int num = rand.nextInt(max - min + 1) + min; return num; }/*from w w w . ja va 2 s . c om*/ }