Source code from the OCPJP7 book