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





Ask Your Doubts Here

Type in
(Press Ctrl+g to toggle between English and the chosen language)

Comments

  • By: guest on 02 Jun 2017 01.26 am
    (2) and (3) are correct. The result range for random() is 0.0 to < 1.0; 1.0 is not in range.
Show Similar Question And Answers
QA->Two statements are given followed by two conclusions I and II. You have to consider the two statements to be true even if they seem to be at variance from commonly known facts. You have to decide which one of the given conclusions is definitely drawn from the given statements. Statement : All virtuous persons are happy. No unhappy person is virtuous. Conclusions : I. Happiness is related to virtue II. Unhappy person is not virtuous.....
QA->In an examination of mathematics Rajesh obtained more marks than the total marks obtained by Rahim and Sabu. The total marks obtained by Rahim and Saji was more than the Rajesh’s. Rajesh obtained more marks than Saji, Reenu obtained more marks than Rajesh. Who amongst them obtained the....
QA->In Kiran’s opinion, his weight is greater than 65 kg but less than 72 kg. His brother does not agree with Kiran and he thinks that Kiran’s weight is greater than 60 kg but less than 70 kg. His mother’s view is that his weight cannot be greater than 68 kg. If all are them are correct in their estimation, what is the average of different probable weights of Kiran?....
QA->A girl started counting the fingers of her left hand, calling the thumb 1, the index finger 2, middle finger 3, ring finger 4, little finger 5 and then reversed the direction calling the ring finger 6 middle finger 7 and do on. She counted upto She ended counting on ……………… finger....
QA->At his usual rowing rate, Rahul can travel 12 miles downstream in a certain river in 6 hrs less than it takes him to travel the same distance upstream. But if he could double his usual rowing rate for this 24 mile round trip, the downstream 12 miles would then take only one hour less than the upstream 12 miles. What is the speed of the current in miles per hour?....
MCQ->What two statements are true about the result obtained from calling Math.random()? The result is less than 0.0. The result is greater than or equal to 0.0.. The result is less than 1.0. The result is greater than 1.0. The result is greater than or equal to 1.0.....
MCQ->Which of the following are valid calls to Math.max? Math.max(1,4) Math.max(2.3, 5) Math.max(1, 3, 5, 7) Math.max(-1.5, -2.8f)....
MCQ->What will be the output of the program? public class BoolTest { public static void main(String [] args) { int result = 0; Boolean b1 = new Boolean("TRUE"); Boolean b2 = new Boolean("true"); Boolean b3 = new Boolean("tRuE"); Boolean b4 = new Boolean("false"); if (b1 == b2) / Line 10 / result = 1; if (b1.equals(b2) ) / Line 12 / result = result + 10; if (b2 == b4) / Line 14 / result = result + 100; if (b2.equals(b4) ) / Line 16 / result = result + 1000; if (b2.equals(b3) ) / Line 18 / result = result + 10000; System.out.println("result = " + result); } }....
MCQ->Which two statements are true about wrapper or String classes? If x and y refer to instances of different wrapper classes, then the fragment x.equals(y) will cause a compiler failure. If x and y refer to instances of different wrapper classes, then x == y can sometimes be true. If x and y are String references and if x.equals(y) is true, then x == y is true. If x, y, and z refer to instances of wrapper classes and x.equals(y) is true, and y.equals(z) is true, then z.equals(x) will always be true. If x and y are String references and x == y is true, then y.equals(x) will be true.....
MCQ->Which two statements are true about comparing two instances of the same class, given that the equals() and hashCode() methods have been properly overridden? If the equals() method returns true, the hashCode() comparison == must return true. If the equals() method returns false, the hashCode() comparison != must return true. If the hashCode() comparison == returns true, the equals() method must return true. If the hashCode() comparison == returns true, the equals() method might return true.....
Terms And Service:We do not guarantee the accuracy of available data ..We Provide Information On Public Data.. Please consult an expert before using this data for commercial or personal use | Powered By:Omega Web Solutions
© 2002-2017 Omega Education PVT LTD...Privacy | Terms And Conditions
Question ANSWER With Solution