add java solution for problems 14, 16, and 17