Using the Math Class

AP Computer Science A· difficulty 3/5

<code>Math.random()</code> returns a double in

  • A

    [1, 10)

  • B

    (0, 1)

  • C

    [0, 1]

  • D

    [0, 1)

    check_circle

Explanation

Range is 0.0 inclusive to 1.0 exclusive.

Want 10 more like this — adaptive to your weak spots?

Related questions