一道SCJP题:
what statements are sure about the result obtained from calling Math.random()?A. The result is less than 0.0.
B. The result is greater than or equal to 0.0.
C. The result is less than 10.0.
D. The result is greater than 1.0.答案是:B和C。我不明白为什么选择C!
我在JAVA DOC中看到关于random()的返回值的解释是:Returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0.但是在SCJP的答案中看到的解释为:The rasult is greater than or equral to 0.0 and result is less than 10.0.The range of values returned from random is value that is greater than or equal to 0.0 and less than 1.0.有些糊涂,请帮忙解释一下!