Question 771: What is the value of "d" after this line of code has been executed?double d = Math.round ( 2.5 + Math.random() );
tcs
wipro
infosys
general
aptitude
javalang-class
java-programming
TheMath.random()method returns a number greater than or equal to0and less than1. Since we can then be sure that the sum of that number and2.5will be greater than or equal to2.5and less than3.5, we can be sure thatMath.round()will round that number to3. So Option B is the answer.