Java Random getRandom()

Here you can find the source of getRandom()

Description

get Random

License

Open Source License

Declaration

public synchronized static Random getRandom() 

Method Source Code

//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;
    }
}

Related

  1. generateRandomNo()
  2. GenerateRandomPin()
  3. getItemID(Random r)
  4. getOreMultiplier(int fortune, Random r)
  5. getPoisson(double lambda, Random rng)
  6. getRandom()
  7. getRandom()
  8. getRandom(Collection collection)
  9. getRandom(int i)