Java work for Stanford CS106A