Scratch for Java

Random::randomInt()

Returns a random integer between 0 and max.

Examples

View on GitHub

Syntax

Java

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

Parameters

Name Data Type Description
max int the maximum integer
min int the minimum integer

Return

int

randomInt()

Create Shareable URL

Select Sections