I wanted to use Dynamic Array in Java,
I will be declaring the array statically,where i will input values into the array ,once the array gets full i will reintialize the array size.
Whether the contents of the array will be removed or it will be maintained.
The contents are deleted in my program ,whether that is expected or not ? Example
class a
{
static int arr[]=new int[10];
arr[]={1,2,3,4,5};
public static void main(String args[])
{
int N=35;
arr=new int[N];
arr[]={1....35};
}
}