This is code for my Java book