# Adding numbers in an empty array in Processing 3.5.3

**URL:** <https://discourse.processing.org/t/adding-numbers-in-an-empty-array-in-processing-3-5-3/10496>\
**Category:** Beginners\
**Created:** [April 20, 2019, 3:15pm UTC](https://discourse.processing.org/t/adding-numbers-in-an-empty-array-in-processing-3-5-3/10496 "2019-04-20T15:15:52Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [April 20, 2019, 3:34pm UTC](https://discourse.processing.org/t/adding-numbers-in-an-empty-array-in-processing-3-5-3/10496/4 "2019-04-20T15:34:17Z")

</div>

Then, remove the keyword `final` from the variable declaration: `int[] arr = new int[600];`

Also, some extra array tips:

> [@Array expand doesn't always work?](https://discourse.processing.org/t/array-expand-doesnt-always-work/10410/2):
>
> Java [arrays](https://processing.org/reference/Array.html) can’t have its length changed once created. coffee What [expand()](https://processing.org/reference/expand_.html) and other similar functions do is create another array w/ a diff. length, copy the contents of the original array to the new 1, and then return the new 1. face_with_monocle So we do need to store the newly returned array to some variable. flushed That’s why an ArrayList, or in your particular case a StringList, is a much better choice as a dynamic length container: bulb[Processing.org/reference/ArrayList.ht…](http://Processing.org/reference/ArrayList.html)

---

_[View the full topic](https://discourse.processing.org/t/adding-numbers-in-an-empty-array-in-processing-3-5-3/10496)._
