I can't figure how to get this going, for every object I create I want to add that to the existing array. I read about arraycopy but I don't know how to increase the existing size of the array and always end up with array out of index error...
A a1 = new A(1, 2, "test");
size = 1;
sizeCounter = 1;
A a[] = new A[size];
a[0] = a1;
A a2 = new A(3, 4, "test2");
sizeCounter++;
if (sizeCounter>=size){
size++;}
A[size-1] = a2;