Hi everyone!
I possibly found a little errata on page 136 of "OCA
Java SE 8 Programmer I Study Guide" book. At the very end of this page there is such a block:
"It actually outputs 1. After adding the two values, the List contains [1, 2]. We then request
the element with index 1 be removed. That’s right: index 1. Because there’s already a remove()
method that takes an int parameter, Java calls that method rather than autoboxing. If you
want to remove the 2, you can write numbers.remove(new Integer(2)) to force wrapper
class use."
There is no doubt that forementioned is right. But it looks like "...to remove the 1, you can write numbers.remove(new Integer(1))..." was meant. I mean it is more neat considering the context.