private void enlageIfNeeded(int i){
  while (end + i > array.length)   array=Arrays.copyOf(array,Math.max(array.length * 2,8));
}

private void enlageIfNeeded ( int i ) { while ( end + i > array . length ) array = Arrays . copyOf ( array , Math . max ( array . length * 2 , 8 ) ) ; }
enlarge the storage array if needed
