Question PRG-JAVA-0080
HardIn Java, what is autoboxing's surprising effect in: Long sum = 0L; for (long i = 0; i < n; i++) sum += i;
- A.
It overflows immediately
- B.
Each iteration creates a new Long object, making the loop much slower
- C.
Sign up free to see the answer and a step-by-step explanation.