Code from Head First Into Java