Scratch for Java

Random::randomInt()

Returns a random integer. You can optionally choose the minimum and maximum of that number.

Syntax

Java

.randomInt()
.randomInt(max)
.randomInt(min, max)

Scratch

Parameters

NameData TypeDescription
minintMinimum value of the random number
maxintMaximum value of the random number

Return

int