Java Random Int getRandomInt()

Here you can find the source of getRandomInt()

Description

Gets a random integer.

License

Open Source License

Return

the random integer

Declaration

public static int getRandomInt() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    private static final Random RANDOM = new Random();

    /**//  www.j a v a2 s . com
     * Gets a random integer.
     *
     * @return the random integer
     */
    public static int getRandomInt() {
        return RANDOM.nextInt();
    }
}

Related

  1. getRandomInt()
  2. getRandomInt()
  3. getRandomInt()
  4. getRandomInt()
  5. getRandomInt()
  6. getRandomInt()
  7. getRandomInt(final int limit)
  8. getRandomInt(final int max)
  9. getRandomInt(final int maxValue)