Q:

Java Non-static array

I have to find dynamic array using in java. I know I can use ArrayList or List but i cant use them now, I really made an effort about finding this, but i couldn't find how to use non static(dynamic) array without Collections, thanks

A:

Arrays have fixed length in Java. There's no way around that.
If you want to add an N:th element to an array, arr with length N-1 then you'll have to 

Create a new array.
Copy over the content of the old array to the new array
Replace all references to the old array with references to the new on.

In code these steps correspond to
int[] newArr = new int[N];
System.arraycopy(arr, 0, newArr, 0, arr.length);
arr = newArr;

or, slightly shorter by using Arrays.copyOf from Java 6:
int[] newArr = Arrays.copyOf(arr, N);
arr = newArr;

