String complexity

When we run a loop from 1 to 10^5 and write s=s+i;
where s is initialised s="".
My question is why the operation of copying string is not considered as a one whole operation each time rather it is changing each time same as the length of string in the video.

Hey @abhinavsehgal802_270a44594b6dc4ad,
For every iteration in the loop we are updating the string and every time we are appending i to the string, a new string is being formed(as strings are immutable in java).

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.