Sail E0 Webinar
Question


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);
}
}
Options:
A .  0
B .  1
C .  257
D .  257.0
Answer: Option D

None.
Output:
$ javac Output.java
$ java Output
257.0



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers