Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## java.util
Class Random

    java.lang.Object
      java.util.Random

    public class Random

extends Object

Pseudo-random number generation.

Constructor Summary
`Random()`
`Random(long seed)`

Method Summary
`int` | `nextInt()`
`int` | `nextInt(int n)` Returns a random integer in the range 0...n-1.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait`

Constructor Detail

### Random

    public Random(long seed)

### Random

    public Random()

Method Detail

### nextInt

    public int nextInt()

  Returns:
    A random positive or negative integer.

### nextInt

    public int nextInt(int n)

  Returns a random integer in the range 0...n-1.

  Parameters:
    `n` - the bound
  Returns:
    A random integer in the range 0...n-1.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD