Working through learningJava