Skip to main content

💻ap computer science a review

Math.random() in AP Computer Science A

Verified for the 2027 exam
Verified for the 2027 exam•Fiveable Content Team

Definition

Math.random() is a method in Java that generates a random decimal number between 0 (inclusive) and 1 (exclusive). It is commonly used to generate random numbers in programming.

This definition is part of Fiveable's AP Computer Science A review, which also has guided practice questions.

"Math.random()" also found in: