Here you can find the source of randomWorld()
public static int randomWorld()
//package com.java2s; //License from project: Open Source License import java.util.concurrent.ThreadLocalRandom; public class Main { public static int randomWorld() { return 1 + ThreadLocalRandom.current().nextInt(10000); }/* w w w . ja v a 2s .c o m*/ }