Q. What will be the output?
Code:
System.out.println(Math.round(2.5));
β
Correct Answer: (B)
3
Explanation: Math.round rounds to nearest integer.