problem 16 java