java problem 1 programming