ThinkingInJava code.