Here you can find the source of getRandom8()
public static int getRandom8()
//package com.java2s; //License from project: Open Source License import java.util.concurrent.ThreadLocalRandom; public class Main { /**/* w ww. ja va 2 s .c om*/ * Generator an random int in 10^7 ~ 10^8<br> * Use nextInt(int origin, int bound) in JDK 1.7 * @return random int */ public static int getRandom8() { return ThreadLocalRandom.current().nextInt(10_000_000, 99_000_000); } }