Computer Applications

Predict the output of the following:

System.out.println(Math.max(-77.66, -87.45));

Java

Java Math Lib Methods

41 Likes

Answer

-77.66

Working

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


Related Questions