Predict the output of the following:
System.out.println(Math.max(-77.66, -87.45));
41 Likes
-77.66
Math.max method returns the greater of its 2 arguments. As -77.66 is greater than -87.45 so it is the output.
Answered By
22 Likes
System.out.println(Math.floor(-0.88));
System.out.println(Math.ceil(-0.95));
System.out.println(Math.round(-18.51));
System.out.println(Math.rint(98.5));