1. Whichever way you use it, you end up relying on the thread class to start multithreading.
2. The start thread is calling the Start method instead of calling the Run method.
3. The same thread object cannot start 2 times, otherwise it will throw an exception: Java.lang.IllegalThreadStateException.
4. There is also a difference between the thread class and the Runnable interface in use, if a class inherits the thread class, it is not suitable for multiple threads to share the resources, and implements the Runnable interface, it can easily realize the sharing of resources.
5.
1 New MyThread (); 2 New Thread (My). Start (); 3 New Thread (My). Start (); 4 New Thread (My). Start ();
6.
1 New MyThread (); 2 New MyThread (); 3 New Thread (MT1). Start (); 4 New Thread (MT2). Start ();
7. Create ready-to-run blocking termination
8. When a thread calls the Stop () method or the run () method finishes executing, it is in a dead state. A thread that is in a dead state does not have the ability to continue running.
9. CurrentThread () is a static method of thread, and when you do not override this method of the parent class thread, there is no difference between this.currentthread and thread.currentthread at this time.
Ten. Thread-0
Java runtime, at least two threads are started, one is the main thread and the other is the garbage collection thread.
12. The main thread is likely to run out of other threads first.
Multi-threaded Learning Notes