A thread is a lightweight unit of execution within a process, allowing an application to perform multiple tasks concurrently while sharing the same memory space.
Every Java application starts with at least one thread - the
mainthread which executes themain()method.Key Characteristics
Lightweight & Shared Memory.
Independent Execution.
Lifecycle States: A thread moves through distinct stages managed by the JVM:
NEW,RUNNABLE,BLOCKED,WAITING,TIMED_WAITINGandTERMINATED.
Loading…