Object ints[] = { "bat", "cat", "dog" };
Array array = new Array( ints );
array.put( 1, "CAT" );
System.out.println( "array = " + array + ", capacity = " + array.capacity() );
System.out.print( "array = " );
for ( int i = 0; i < ints.length; i++ )
System.out.print( ints[ i ] + " " );
System.out.println();
array.ensureCapacity( 100 );
array.put( 2, "DOG" );
System.out.println( "array = " + array + ", capacity = " + array.capacity() );
System.out.print( "array = " );
for ( int i = 0; i < ints.length; i++ )
System.out.print( ints[ i ] + " " );
System.out.println();