Having proplems with string arrays

I set my array to a size 1000000 and initialized its contents with:
(int I=0;i<1000000;i++) mytext[I] =" ";
so why when I use something like:
rec[I] = mytext[I];
to get a temporary instance of the mytext[I] that the debugger stalls;
I need to insert a new string into mytext and I know how to sort.
What am I supposed to do whenever the size of my array needs to be 1000001 ?

1 Like

Sounds like you are wanting a dynamic array, in that case you want an ArrayList.

https://processing.org/reference/ArrayList.html

1 Like