Predict the output of the following:
System.out.println(Math.min(-25.5, -12.5));
40 Likes
-25.5
Math.min method returns the smaller of its 2 arguments. As -25.5 is smaller than -12.5 so it is the output.
Answered By
24 Likes
System.out.println(Math.ceil(-0.95));
System.out.println(Math.round(-18.51));
System.out.println(Math.rint(-99.4));
System.out.println(Math.cbrt(42.875));