# Having proplems with string arrays

**URL:** <https://discourse.processing.org/t/having-proplems-with-string-arrays/21436>\
**Category:** Coding Questions\
**Created:** [May 30, 2020, 9:26pm UTC](https://discourse.processing.org/t/having-proplems-with-string-arrays/21436 "2020-05-30T21:26:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntiViral\_Builder](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@AntiViral\_Builder](https://discourse.processing.org/u/AntiViral_Builder)\
**Post date:** [May 30, 2020, 9:26pm UTC](https://discourse.processing.org/t/having-proplems-with-string-arrays/21436/1 "2020-05-30T21:26:57Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![slow\_izzm](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/slow_izzm/32/5637_2.png) [@slow\_izzm](https://discourse.processing.org/u/slow_izzm)\
**Post date:** [May 30, 2020, 10:13pm UTC](https://discourse.processing.org/t/having-proplems-with-string-arrays/21436/2 "2020-05-30T22:13:47Z")

</div>

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

[https://processing.org/reference/ArrayList.html](https://processing.org/reference/ArrayList.html)
