P84: Added Java solution.