Integer x = 7;
int y = x + 3;
System.out.println(y);What is printed?
- Acheck_circle
10
- B
7
- C
37
- D
73
Explanation
The Integer x is auto-unboxed to int 7 when used in arithmetic, so y = 7 + 3 = 10.
AP Computer Science A· difficulty 2/5
Integer x = 7;
int y = x + 3;
System.out.println(y);What is printed?
10
7
37
73
Explanation
The Integer x is auto-unboxed to int 7 when used in arithmetic, so y = 7 + 3 = 10.
Want 10 more like this — adaptive to your weak spots?