Unless somebody who has a copy of the book replies, please post more details. I don't have that book and cannot therefore verify the exact context. Please also supply the author's name, which makes the book much easier to locate in a library or bookshop.
Paweł,
Yes, it should. Technically that example is Java 7 and 8, but we meant 8. I added it to our private list rather than the errata since it could be improved, but isn't quite wrong.