Java.lang Class

Q1:
What two statements are true about the result obtained from calling Math.random()?
  1. The result is less than 0.0.
  2. The result is greater than or equal to 0.0..
  3. The result is less than 1.0.
  4. The result is greater than 1.0.
  5. The result is greater than or equal to 1.0.

A 1 and 2

B 2 and 3

C 3 and 4

D 4 and 5

ANS:B - 2 and 3

(2) and (3) are correct. The result range for random() is 0.0 to < 1.01.0 is not in range.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.