Homework Java Loops