Module java.base
Package java.lang

# Class Thread

=
public class Thread
extends java.lang.Object
implements java.lang.Runnable

## Nested Types

- = Builder
- = State
- = UncaughtExceptionHandler

## Fields

- =
  public static final int MAX_PRIORITY = 10
- =
  public static final int MIN_PRIORITY = 1
- =
  public static final int NORM_PRIORITY = 5

## Constructors

- =
  public Thread()
- =
  public Thread(java.lang.Runnable arg0)
- =
  public Thread(java.lang.Runnable arg0, java.lang.String arg1)
- =
  public Thread(java.lang.String arg0)
- =
  public Thread(java.lang.ThreadGroup arg0, java.lang.Runnable arg1)
- =
  public Thread(java.lang.ThreadGroup arg0, java.lang.Runnable arg1, java.lang.String arg2)
- =
  public Thread(java.lang.ThreadGroup arg0, java.lang.Runnable arg1, java.lang.String arg2, long arg3)
- =
  public Thread(java.lang.ThreadGroup arg0, java.lang.Runnable arg1, java.lang.String arg2, long arg3, boolean arg4)
- =
  public Thread(java.lang.ThreadGroup arg0, java.lang.String arg1)

## Methods

- =
  public static int activeCount()
- =
  @Deprecated(since="17"forRemoval=true)
  public final void checkAccess()
- =
  protected java.lang.Object clone() throws java.lang.CloneNotSupportedException
- =
  public static java.lang.Thread currentThread()
- =
  public static void dumpStack()
- =
  public static int enumerate(java.lang.Thread[] arg0)
- =
  public static java.util.Map<java.lang.Thread, java.lang.StackTraceElement[]> getAllStackTraces()
- =
  public java.lang.ClassLoader getContextClassLoader()
- =
  public static java.lang.Thread.UncaughtExceptionHandler getDefaultUncaughtExceptionHandler()
- =
  @Deprecated(since="19")
  public long getId()
- =
  public final java.lang.String getName()
- =
  public final int getPriority()
- =
  public java.lang.StackTraceElement[] getStackTrace()
- =
  public java.lang.Thread.State getState()
- =
  public final java.lang.ThreadGroup getThreadGroup()
- =
  public java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()
- =
  public static boolean holdsLock(java.lang.Object arg0)
- =
  public void interrupt()
- =
  public static boolean interrupted()
- =
  public final boolean isAlive()
- =
  public final boolean isDaemon()
- =
  public boolean isInterrupted()
- =
  public final boolean isVirtual()
- =
  public final void join() throws java.lang.InterruptedException
- =
  public final void join(long arg0) throws java.lang.InterruptedException
- =
  public final void join(long arg0, int arg1) throws java.lang.InterruptedException
- =
  public final boolean join(java.time.Duration arg0) throws java.lang.InterruptedException
- =
  public static java.lang.Thread.Builder.OfPlatform ofPlatform()
- =
  public static java.lang.Thread.Builder.OfVirtual ofVirtual()
- =
  public static void onSpinWait()
- =
  public void run()
- =
  public void setContextClassLoader(java.lang.ClassLoader arg0)
- =
  public final void setDaemon(boolean arg0)
- =
  public static void setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler arg0)
- =
  public final void setName(java.lang.String arg0)
- =
  public final void setPriority(int arg0)
- =
  public void setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler arg0)
- =
  public static void sleep(long arg0) throws java.lang.InterruptedException
- =
  public static void sleep(long arg0, int arg1) throws java.lang.InterruptedException
- =
  public static void sleep(java.time.Duration arg0) throws java.lang.InterruptedException
- =
  public void start()
- =
  public static java.lang.Thread startVirtualThread(java.lang.Runnable arg0)
- =
  public final long threadId()
- =
  public java.lang.String toString()
- =
  public static void yield()

## Summary

No differences.