Hello everyone,

I was experimenting a bit with arrays and integers but I found myself having trouble with adding numbers to an array. I want to create an array, add a number to the array (so the length increases) and print all numbers in the array one by one. Here’s what I’ve got so far:

```
int[] numbers = {1, 2, 3};
void setup() {
numbers.add(4); // <--This code doesn't work and needs to be changed, but to what?
for(int i = 0; i < numbers.length; i++) {
print(numbers[i]);
}
}
void draw() {}
```

now my output is:

```
123
```

and I want it to be:

```
1234
```

Any help would be greatly appreciated.

Now that this has been solved, for anyone wanting to learn about ArrayLists too here’s a great video explaining it all: [Video]