void add(Thread t){
synchronized (this) {
    if (destroyed) {
      throw new IllegalThreadStateException();
    }
    if (threads == null) {
      threads=new Thread[4];
    }
 else     if (nthreads == threads.length) {
      threads=Arrays.copyOf(threads,nthreads * 2);
    }
    threads[nthreads]=t;
    nthreads++;
    nUnstartedThreads--;
  }
}

void add ( Thread t ) { synchronized ( this ) { if ( destroyed ) { throw new IllegalThreadStateException ( ) ; } if ( threads == null ) { threads = new Thread [ 4 ] ; } else if ( nthreads == threads . length ) { threads = Arrays . copyOf ( threads , nthreads * 2 ) ; } threads [ nthreads ] = t ; nthreads ++ ; nUnstartedThreads -- ; } }
adds the specified thread to this thread group . < p > note : this method is called from both library code and the virtual machine . it is called from vm to add certain system threads to the system thread group .
