Here you can find the source of getRandom()
public synchronized static Random getRandom()
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { private static Random random = null; public synchronized static Random getRandom() { if (random == null) { random = new Random(); random.setSeed(System.currentTimeMillis()); }/*ww w .j a va2 s .c o m*/ return random; } }