Question
class Output {
public static void main(String args[]) {
Integer i = new Integer(257);
float x = i.floatValue();
System.out.print(x);
}
}
What is the output of this program?
class Output {
public static void main(String args[]) {
Integer i = new Integer(257);
float x = i.floatValue();
System.out.print(x);
}
}
Answer: Option D
Was this answer helpful ?
None.
Output:
$ javac Output.java
$ java Output
257.0
Was this answer helpful ?
Submit Solution