A

Admin • 828.03K Points
Coach

Q. What will the output of the following program?

Code:
public class Test{
public static void main(String args[]){
float f = (1 / 4) * 10;
int i = Math.round(f);
System.out.println(i);
}
}
  • (A) 2
  • (B) 0
  • (C) 3
  • (D) 2.5
  • Correct Answer - Option(B)
  • Views: 20
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.