Java assignment #1