A

Admin • 831K Points
Coach

Q. What is the output of the below java code with autoboxing?

Code:
public class AutoBoxingTest2
{
static void show(int reading)
{
System.out.println("Reading: " + reading);
}
public static void main(String[] args)
{
Integer a = Integer.valueOf(10);
show(a);
}
}
  • (A) Reading: 0
  • (B) Reading: 10
  • (C) Compiler error
  • (D) Runtime Error
  • Correct Answer - Option(B)
  • Views: 17
  • 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.