Java Syntax homework