added java solutions