Java Function To Remove A Character From A String