code: public final void interrupt() {
          int ngroupsSnapshot;
          ThreadGroup[] groupsSnapshot;
          synchronized (this) {
              checkAccess();
              for (int i = 0 ; i < nthreads ; i++) {
                  threads[i].interrupt();
              }
              ngroupsSnapshot = ngroups;
              if (groups != null) {
                  groupsSnapshot = Arrays.copyOf(groups, ngroupsSnapshot);
              } else {
                  groupsSnapshot = null;
              }
          }
          for (int i = 0 ; i < ngroupsSnapshot ; i++) {
              groupsSnapshot[i].interrupt();
          }
      }
docs: Interrupts all threads in this thread group.
  <p>
  First, the <code>checkAccess</code> method of this thread group is
  called with no arguments; this may result in a security exception.
  <p>
  This method then calls the <code>interrupt</code> method on all the
  threads in this thread group and in all of its subgroups.
  
  @exception  SecurityException  if the current thread is not allowed
  to access this thread group or any of the threads in
  the thread group.
  @see        java.lang.Thread#interrupt()
  @see        java.lang.SecurityException
  @see        java.lang.ThreadGroup#checkAccess()
  @since      1.2