Java - Task 1