added java solution
deletion