Java ThreadLocalRandom randomWorld()

Here you can find the source of randomWorld()

Description

Returns a random integer that is a suitable value for both the id and randomNumber properties of a world object.

License

Apache License

Return

a random world number

Declaration

static int randomWorld() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.concurrent.*;

public class Main {
    /**/*from w  w w . jav  a2 s.  c o  m*/
     * Returns a random integer that is a suitable value for both the {@code id}
     * and {@code randomNumber} properties of a world object.
     *
     * @return a random world number
     */
    static int randomWorld() {
        return 1 + ThreadLocalRandom.current().nextInt(10000);
    }
}

Related

  1. RandomString(int length)
  2. randomString(int minLength, int maxLength)
  3. randomString(List strings)
  4. randomStringArray(int arrayLength, int stringLength)
  5. randomWorld()
  6. shuffle(final T[] array)
  7. shuffle(T[] arr)
  8. shuffle(T[] array)
  9. shuffleArray(int[] ar)