Java - Wrapper Classes
What is the output of the following code?
Integer a = 10; int b = a + 5; System.out.println(b);
Integer a = 10; int b = a + 5; System.out.println(b);
a is an Integer object holding 10. When used in arithmetic, it is unboxed to int.a (10) plus 5 equals 15, which is stored in b and printed.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions