I have a requirement in which I need to remove the semicolon if it is present at the end of the String(only at the end). I have tried the following code. But still it is not
Strings in java are immutable, so replaceAll returns a new string.
replaceAll
Do
text = text.replaceAll(";", "");