P231: Added Java solution.
P265: Added Java solution.
P164: Added Java and Mathematica solutions.