13 of 13 people found the following review helpful
For Effective Java fans,
By A Customer
This review is from: Java Puzzlers: Traps, Pitfalls, and Corner Cases (Paperback)
Very much in the style of Effective Java, this expands on (and refers to) some of the themes in that book, so you might want to read it before this one.
Java Puzzlers highlights some workings of the Java language that might trip you up, particularly when it comes to instantiating and initialising class members and fields. These are represented as small code snippets, the output of which you are expected to predict.
To be honest, as long as you follow correct Java practices (naming packages, classes, methods etc according to standards) you won't be tripped up by most of these. Personally, I have no cause to be messing about with byte and char primitives types, attempting to cast them to ints, hex, octal, or carrying out obscure bit shifting - this seems rather a low-level C-ish thing to do.
That said, there is also some sage advice, particularly about the vagaries of overloading and overriding, and the advice is collected together into an appendix for easy access. It doesn't feel quite as cohesive as EJ, though.
A special mention should go to the various optical illusions that accompany the puzzles. A lot of these I've not seen before, and several of them may cause your optic nerve to melt.
Not as essential as Effective Java, but still worth reading.