nextInt

open override fun nextInt(): Int

Generates an Int value.

Return

the next random value.


open override fun nextInt(n: Int): Int

Generates an Int value between 0 (inclusive) and the specified value (exclusive).

Return

a random integer between 0 (inclusive) and n (exclusive).

Parameters

n

the bound on the random number to be returned. Must be positive.