Homework for Java