I want to replace, say String oldString with String newString in an Array along the lines of:
for (int i = 0; i < text.length; i++) {
if (text[i].equals(oldString)) {
text[i] = text[i].replace(oldString, newString);
}
}
How would one go about this in Java?