public void clear(){
  for (int i=0; i < arrays.length(); i++) {
    arrays.set(i,null);
  }
}

public void clear ( ) { for ( int i = 0 ; i < arrays . length ( ) ; i ++ ) { arrays . set ( i , null ) ; } }
clear method in presense of concurrency complicates everything to no end . please rewrite every other method if ever decide to implement this
