<code>(int) Math.round(3.6)</code> evaluates to
- Acheck_circle
4
- B
Compile error
- C
3
- D
3.6
Explanation
<code>Math.round(3.6)</code> returns 4 (long); cast to int = 4.
AP Computer Science A· difficulty 4/5
<code>(int) Math.round(3.6)</code> evaluates to
4
Compile error
3
3.6
Explanation
<code>Math.round(3.6)</code> returns 4 (long); cast to int = 4.
Want 10 more like this — adaptive to your weak spots?