Am I able to change the index inside the for loop in java? For example:
for (int j = 0; j < result_array.length; j++){
if (item==\" \") {
Yes you can change index inside a for loop but it is too confusing. Better use a while loop in such case.
int j = 0;
while (j < result_array.length) {
if (item.equals(" ")) {
result_array[j] = "%";
result_array[j + 1] = "2";
result_array[j + 2] = "0";
j = j + 2;
} else
result_array[j] = item;
j++;
}