# Creating an array of arrays

**URL:** <https://discourse.processing.org/t/creating-an-array-of-arrays/6826>\
**Category:** Beginners\
**Created:** [December 22, 2018, 3:43pm UTC](https://discourse.processing.org/t/creating-an-array-of-arrays/6826 "2018-12-22T15:43:41Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [December 22, 2018, 4:16pm UTC](https://discourse.processing.org/t/creating-an-array-of-arrays/6826/3 "2018-12-22T16:16:26Z")

</div>

`int[][]` 2d array example: 🤓

> [@Final array is being changed](https://discourse.processing.org/t/final-array-is-being-changed/1447/4):
>
> Some of my clone() examples I did a long time ago at the link below may help ya out: smile_cat[https://Forum.Processing.org/two/discussion/12044/how-do-i-copy-out-one-row-of-a-2d-array-into-a-1d-array](https://Forum.Processing.org/two/discussion/12044/how-do-i-copy-out-one-row-of-a-2d-array-into-a-1d-array) final int[][] stuff = { {1, 2, 3}, {4, 5, 6}, {7, 8, 9} }; final int[] myArray = stuff[2]; // it's an alias for stuff[2]. myArray[0] = 10; // thus it alters stuff[2] too! println(stuff[2][0]); // prints out 10. stuff[2] is also affected! final int[] myClone = stuff[2].clone(); // it's a clon…

> **[Array 2D / Examples](https://processing.org/examples/array2d.html)**
>
> Demonstrates the syntax for creating a two-dimensional (2D) array. Values in a 2D array are accessed through two index values. 2D arrays are useful for storing images. In this example, each dot is col…

---

_[View the full topic](https://discourse.processing.org/t/creating-an-array-of-arrays/6826)._
