I have a string which has alot of commas. What I want to do is remove the last comma in the String for example:
1,2,3,4,5,
I want it to be 1,2,3,4,5
I dont want to remove all the commas just the last character.
Thank you for your help
Printable View
I have a string which has alot of commas. What I want to do is remove the last comma in the String for example:
1,2,3,4,5,
I want it to be 1,2,3,4,5
I dont want to remove all the commas just the last character.
Thank you for your help
String (Java Platform SE 6)
string = string.substring(0, string.length()-1);
Thank you =]