P135: Added Java solution.