-
What is the output of this program?
public class Result
{
public static void main(String args[])
{
Double num = new Double(260.062);
int p = num.intValue();
System.out.print(p);
}
}
-
- 260.062
- 260
- 260.06
- 260.0
- 260.260
Correct Option: B
num.intValue() method returns the value of wrapper i as a Integer. num is 260.062 is double number when converted to an integer data type its value is 260.