code: public Thread newThread(Runnable r) {
          Thread t;
          if (threadGroup == null) {
              t = new Thread(r, threadBaseName + threadCounter.incrementAndGet());
              t.setDaemon(isDaemon);
          } else {
              t = new Thread(threadGroup, r, threadBaseName + threadCounter.incrementAndGet());
              t.setDaemon(isDaemon);
          }
          return t;
      }
docs: Constructs a new Thread. Initializes name, daemon status, and ThreadGroup
  if there is any.
  
  @param r
  A runnable to be executed by new thread instance
  @return The constructed thread