💻ap computer science a review

Math.random() method

Written by the Fiveable Content Team • Last updated August 2025
Verified for the 2026 exam
Verified for the 2026 examWritten by the Fiveable Content Team • Last updated August 2025

Definition

The Math.random() method is a built-in function in Java that generates a random decimal number between 0 (inclusive) and 1 (exclusive).

"Math.random() method" also found in:

2,589 studying →