First java homework