Head First Java code