-
What is the output of this program?
public class Result
{
public static void main(String args[])
{
Double num = new Double(260.00625023);
float p = num.floatValue();
System.out.print(p);
}
}
-
- 260.00626
- 260
- 260.00625023
- 260.00
- 260.260
Correct Option: A
floatValue() converts the value of wrapper i into float, since float can measure till 5 places after decimal hence 260.00626 is stored in floating point variable p.