Changed some bracket locations
p006: Added Java solution