Q. What is the output of System.out.println(Math.round(3.7));?

A
3
B
4
C
3.7
Solution:

Math.round() rounds a number to the nearest integer, so 3.7 rounds to 4.

Entri Contact Image

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