Try find the billionth fibonacci number. The answer should be in hexadecimal, and to prove that you have the whole number, you need to post the first 10 bytes and the last 10 bytes. I solved it in 2500 seconds on an 8-core machine. Winner will get special mention.
I like a good Java puzzle. The trickier the better. In this article I will tell you about a new set of puzzles that will melt your Java brain.
What is the largest double that could in theory be produced by Math.random()? In this newsletter, we look at ways to calculate this based on the 48-bit random generator available in standard Java. We also prove why in a single-threaded program, (int)(Random.nextDouble() + 1) can never be rounded up to 2.
A couple of weeks ago, I sent out a little quiz to my readers of The Java Specialists' Newsletter. No one managed to figure out what the code does without running it. Some managed to explain the result once they had run it. Perfect quiz for weeding out those job applicants you don't like. Especially if you are working in the banking industry. OK, enough hints, let's look at the quiz :-)