Java lab 6