Core Java Homework