Substring replacement in Java
Forums:
String startString = "3, 2, 1, go!";
startString = startString.replace("1", "one").
replace("2", "two").replace("3", "three");
//startString = "three, two, one, go!"
- Log in to post comments
String startString = "3, 2, 1, go!";
startString = startString.replace("1", "one").
replace("2", "two").replace("3", "three");
//startString = "three, two, one, go!"