R

Ritu Singhal • 4.36K Points
Extraordinary

Q. What will be the output of the following Java code?
class Output
{
public static void main(String args[])
{
Double i = new Double(257.578123456789);
float x = i.floatValue();
System.out.print(x);
}
}

  • (A) 0
  • (B) 257.0
  • (C) 257.57812
  • (D) 257.578123456789
  • Correct Answer - Option(C)
  • Views: 30
  • Filed under category JAVA

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.


Question analytics