A
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);
}
}
{
static void show(int reading)
{
System.out.println("Reading: " + reading);
}
public static void main(String[] args)
{
Integer a = Integer.valueOf(10);
show(a);
}
}
- Correct Answer - Option(B)
- Views: 17
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.