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==" ") {
result_array[j] = "%";
result_array[j+1] = "2";
result_array[j+2] = "0";
j = j+2;
}
else result_array[j] = item;
}
Although it is doing j++ in the for loop, inside the for loop, i am also doing j = j + 3. Is it possible for me to achieve this?