protected void expandCapacity(){
  String[] newArray=new String[array.length << 1];
  System.arraycopy(array,0,newArray,0,index);
  array=newArray;
}

protected void expandCapacity ( ) { String [ ] newArray = new String [ array . length << 1 ] ; System . arraycopy ( array , 0 , newArray , 0 , index ) ; array = newArray ; }
expands internal string array by multiplying its size by 2 .
