Skip to content

Category Archives: puzzles

Shards in your Latte

Here are the slides from my "Shards in your Latte" PJUG presentation on January 15:
javasharpedges.pdf
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 [...]

Bubble, bubble, toil and Double

Inspired by Weiqi Gao's Friday Java Quiz this week, I came up with a few more curiosities of Java double. What do each of the calls to larger() print? Hint: this puzzle has nothing to do with type conversion loss of precision, it is only about the specified behavior of doubles.

public class Foo [...]