A

Admin • 828.03K Points
Coach

Q. What is the output of the below Java code with Autoboxing and unboxing?

Code:
float f1 = 10.0f;
Float f2 = Float.valueOf(10);
if(f1 == f2)
System.out.println("FLOATs are equal.");
else
System.out.println("FLOATs are not equal.");
  • (A) FLOATs are not equal.
  • (B) FLOATs are equal.
  • (C) Compiler error
  • (D) None of these
  • Correct Answer - Option(B)
  • Views: 4
  • Filed under category Java
  • Hashtags:

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.