Beginner Java code.