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

random integer

Parameters

Name Data Type Description
min int Minimum value of the random number
max int Maximum value of the random number

Return

int

randomInt()