Zamples, Inc. has released a free public resource: live code examples for JDK 1.4, JDK 1.5 and APIs such as the Google Web Services API, the Amazon Web Service API, Java Servlet API and others. Plug in code to the web form and "Run It!".
"Want to kick the tires on JDK 1.5 without having to install any software? Puzzled by how an method in an API works, and wish you had a handy live code example that you could play with?
You should try Zamples (http://zamples.com) - it is free to programmers to use.
Software platform vendors can use Zamples to grow their ecosystem of developers and keep them up to date. Journalists and online authors can use Zamples to write interactive stories about software, complete with 'Try It!' buttons. Contact sales at zamples dot com to learn more."
Visit the Samples page to test out code
I don't know if many people would use this versus preferring their IDE of choice (with completion etc), but kinda fun!