random

Returns a random element from this range.

Since Kotlin

2.5

Throws

if this range is empty.


Returns a random element from this range using the specified source of randomness.

Since Kotlin

2.5

Throws

if this range is empty.