[Solved] Whats Happening in this for loop? [closed]


It is simple:

Address = Address.concat(String.valueOf(i));

Address initailly had a whatever value: 5.20.86.0.

In your for loop you are appending the i current value, but you don’t delete the previous value!
So it is going to 5.20.86.012345678910 as 5.20.86. and 012345678910 than 012345678910 11 12 13 14 and so on.

I hope it is a good explanation for what is going there. Not sure what would you like to archive, but wan’t the question.

3

solved Whats Happening in this for loop? [closed]