Java lab 3