Code in Java for www.headfirstlabs.com/books/hfdp/