Q. What is the output of System.out.println(Math.abs(-5.7));?

A
-5.7
B
5.7
C
0.0
D
6
Solution:

Math.abs() returns the absolute value, so -5.7 becomes 5.7.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!