Added Java solution for 4, 8 & 9, and Haskell solution for 1.
Partly finished problem 3.