Here you can find the source of getRandomInteger()
static Integer getRandomInteger()
//package com.java2s; //License from project: Apache License import java.util.concurrent.ThreadLocalRandom; public class Main { static Integer getRandomInteger() { return ThreadLocalRandom.current().nextInt(1, 1000); }// w w w . ja va 2 s .co m }