Home » JAVA Programming » Numbers » Question
  1. What is the range of numbers returned by Math.random() method?
    1. 0 to 100
    2. 0.0 to 1.0
    3. -1 to 1
    4. -1.0 to 1.0
    5. None of these
Correct Option: B

Math.random() returns only double value greater than or equal to 0.0 and less than 1.0.



Your comments will be displayed only after manual approval.