remove last 3 characters from string java