So unless I am missing something the explanation in K&B has to be wrong.
Unfortunately, you are missing something.... Notice that the example uses autoboxing. And notice that the example has them as the same object.
It is your example that doesn't use autoboxing. And it is your example that shows them as different. The book has the correct example, and shows it as explained.
Henry