// allocating an array and initialising it.

// note how you never specify the array's size in its type declaration.
int[] v;

// Allocate space for the array (normally collapsed onto the previous line)
// Also sets all elements to 0.
v = new int[100];

// Unlike String, ArrayList and Collection, you get at the size of an array with
// a read-only field v.length, not the v.length() or v.size() used elsewhere.
for ( int i=0; i<v.length; i++ )
   {
   // initialise the individual elements.
   v[i] = i*2 + 999;
   }