How To Remove Last Element From String In Java