Store variable data in array

 Hi,

Thanks in advance for all your help.

I'm trying to store the data of a String variable in an array. 

The user inserts the code of a product and it stores in the first position of the array.

If he wants to purchase another product i need to store again but in the next position of the array.

As i am doing it returns an error because the array is null, and at the beggining i can't specify the array size and initialize it.

Any suggestions?

Thank you very much.

 

Recommended Reading: