add java to problem 1
problem 2