# Initialize 2d array

**URL:** <https://forum.uipath.com/t/initialize-2d-array/76255>\
**Category:** Help\
**Tags:** studio\
**Created:** [November 14, 2018, 6:32pm UTC](https://forum.uipath.com/t/initialize-2d-array/76255 "2018-11-14T18:32:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RpaTest\_Pwc](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rpatest_pwc/32/47937_2.png) [@RpaTest\_Pwc](https://forum.uipath.com/u/RpaTest_Pwc)\
**Post date:** [November 14, 2018, 6:32pm UTC](https://forum.uipath.com/t/initialize-2d-array/76255/1 "2018-11-14T18:32:20Z")

</div>

Hi, i´m trying to create a bidimientional array. I have to initialize it and set the sizes of rows and columns but new String(20)(20){} is throwing an error.

Any ideas on how to set the initial size of the array?

Thanks

---

<div class="post-metadata">

**Author:** ![megharajky](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/megharajky/32/345216_2.png) [@megharajky](https://forum.uipath.com/u/megharajky)\
**Post date:** [November 14, 2018, 7:15pm UTC](https://forum.uipath.com/t/initialize-2d-array/76255/2 "2018-11-14T19:15:23Z")

</div>

Syntax is right, you can use it in sign or to set default value.  
But  
While creating the variable how you created? It should be bidimentional array too… Can you share the screenshot of variable data type?

Thanks,  
Meg

---

<div class="post-metadata">

**Author:** ![PrankurJoshi](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/prankurjoshi/32/37212_2.png) [@PrankurJoshi](https://forum.uipath.com/u/PrankurJoshi)\
**Post date:** [November 15, 2018, 6:27am UTC](https://forum.uipath.com/t/initialize-2d-array/76255/3 "2018-11-15T06:27:33Z")

</div>

Hi @RpaTest_Pwc

Have a look at this sample

[multi\_dim\_array.xaml](https://global.discourse-cdn.com/uipath/original/2X/6/666acaf5d4ce1bf99fe7672e8335a9704bede727.xaml) (5.7 KB)

And this

 ![image](https://global.discourse-cdn.com/uipath/original/3X/e/f/efa85d53b4cc7a3981045241f2e05b22b209e3b0.png)

When using array of array you can only specify top level array bound

Thanks,  
Prankur

---

<div class="post-metadata">

**Author:** ![RpaTest\_Pwc](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/rpatest_pwc/32/47937_2.png) [@RpaTest\_Pwc](https://forum.uipath.com/u/RpaTest_Pwc)\
**Post date:** [November 15, 2018, 4:57pm UTC](https://forum.uipath.com/t/initialize-2d-array/76255/4 "2018-11-15T16:57:14Z")

</div>

Thanks!!!
