πŸ“Š JAVA
Q. What will be the output?
Code:
System.out.println(Math.round(2.5));
  • (A) 2
  • (B) 3
  • (C) 2.5
  • (D) Compilation Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) 3

Explanation: Math.round rounds to nearest integer.

Explanation by: Roshan
Math.round rounds to nearest integer.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
1
Total Visits
πŸ“½οΈ
6 d ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
82%
Success Rate