Java.lang Class

Q1:
Which statement is true given the following? Double d = Math.random();

A 0.0 < d <= 1.0

B 0.0 <= d < 1.0

C Compilation fail

D Cannot say.

ANS:B - 0.0 <= d < 1.0

The Math.random() method returns a double value with a positive sign, greater than or equal to 0.0 and less than 1.0



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.