added Java solution to Collatz

I added a Java solution to the Collatz problem.