Here are the slides from my "Shards in your Latte" PJUG presentation on January 15:
The Josh Bloch / Bill Pugh puzzlers talk from JavaOne given at Google. The Elvis example comes straight from here, and they do a better example of describing it than I did.
The Java Puzzlers book.
A couple of things that came up at the talk:
- There's no version of String.replaceAll that takes a Pattern. I said I thought there was without thinking for more than a second about it.
- Until the most recent version of Groovy, it didn't have a classical C-style 'for' loop. There was a lot of disagreement when I mentioned it, and I should have been more precise when I said that as to not imply that Groovy had no 'for' loop constructs.
Please add anything you think I got wrong, or anything you found interesting.