question: private void checkSize ( final int i ) { if ( i >= max_size ) { final int old_size = max_size ; max_size += increment_size ; if ( max_size <= i ) { max_size = i + increment_size + 2 ; } final String [ ] temp = items ; items = new String [ max_size ] ; System . arraycopy ( temp , 0 , items , 0 , old_size ) ; increment_size = incrementSize ( increment_size ) ; } }
target:  check the size of the array and increase if needed