Homework in Java Basics