i want to create an array whose size is determined at runtime i dont want to give the dimensions of the array at declaration. for eg: int  ary; int index=0; ary[index]=12 gives Null pointer exception.
Is there any way to declare an array and not mention the size of it and insert values into it...faciliating the size to be determined at runtime.
Joined: Sep 15, 2004
Array are not to be dynamic. You should use an ArrayList or Vectors.
Victor Flores O'connor
Joined: Aug 05, 2005
you mean like this??? 'size' can be whatever you want at runtime