A
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);
}
}
public static void main(String args[]){
float f = (1 / 4) * 10;
int i = Math.round(f);
System.out.println(i);
}
}
- Correct Answer - Option(B)
- Views: 20
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.