Hương Trang
New member
What will be the output of the following Java program?
A. 0
B. 257.0
C. 257.57812
D. 257.578123456789
Code:
class Output
{
public static void main(String args[])
{
Double i = new Double(257.578123456789);
float x = i.floatValue();
System.out.print(x);
}
}
B. 257.0
C. 257.57812
D. 257.578123456789