I just wanted to let those interested know that the
UVa Online Judge, a site with literally thousands of programming contest type problems has migrated to a new server and now supports
Java 1.6.0. It's not a pay site, registration and submission is all free. For a long time they only supported Java 1.1 so this is a huge improvement.
FYI, all Java programs must be submitted in a single source file called Main.java. Nested classes and the like are allowed I believe, although I haven't tried them yet. The judge places a premium on performance meaning the programs must complete under a certain time limit. Even if the program is correct, it can be discouraging getting "Time Limit Exceeded" rejections. On the very first problem I tried (Problem 100), I couldn't get in under the time limit until I changed my isOdd() method from:
to:
Which I guess is a little faster. Although I got my greatest speed gains when I used a Map to memoize results I'd already calculated, which I guess is a much more effective and realistic optimization.
By the way, I have no affiliation with the site except that I find the problems slightly challenging and pretty fun.