Integer a = 10;
Integer b = 3;
System.out.println(a / b);What is printed?
- Acheck_circle
3
- B
10
- C
3.0
- D
3.33
Explanation
The Integer values are unboxed to ints; integer division of 10 / 3 truncates to 3.
AP Computer Science A· difficulty 3/5
Integer a = 10;
Integer b = 3;
System.out.println(a / b);What is printed?
3
10
3.0
3.33
Explanation
The Integer values are unboxed to ints; integer division of 10 / 3 truncates to 3.
Want 10 more like this — adaptive to your weak spots?