An interesting exercise, but ends up in some of the worst java you'll ever see in your life. This would be a good thing to show people moving from language A to language B, as a reason to not just try and reuse language A's idioms in language B.
I agree. The stack of closing parens and closing braces in Java looks like a warning sign.
But I also find Richard's Haskell code remarkably clear. It solves the puzzle elegantly.