There are two ways of implementing multithreading in Java:
1: Inherit the thread class override inside the Run method,
2: Implementing the runable implementation of the Run method----new Thread (Runable implementation Class)
There are some methods that need to be known,
Join ()----> The thread execution is complete before you can perform anything else.
Join (time)---other threads will wait for this thread to execute, but more than this no longer waits and executes in parallel.
Sleep (): Let the program wait.
Yieid (), thread concession (priority)
The Start method executes before the thread is started, so the program is in a ready state, which notifies the Java virtual machine to create a method call stack and a program counter, but whether it is run depends on the thread dispatch point in the JVM.
But the dead program call start will throw an exception.
Java Implementation Multithreading