No matter how much Java I like it, from the actual development perspective, Java's multi-thread does not have C good. Performance in: 1.java has no global variables; 2. The communication between the thread between Java is relatively poor, C provides a variety of communication methods; 3. Java data synchronization is achieved by synchronized, but basically is equal to the virtual virtual The machine is completed, while C has many species: critical regions, mutex, etc. 4. The multi-threaded RUN method of Java has no return value, so how to get feedback from sub-threads, it is really a headache. 5. Java's multithreading is a collaboration, which is equal to the operating system to abandon the control of threads; talk about my writing experience in Java multi-thread: 1. When you create Thread, transfer the master class or called the call class. In the constructor, for example, Class A calls Class B, Class A as a parameter of the Class B constructor. When you create a sub-thread, you can implement it in the same way, so the instance variable of the main control class can be used as a global variable, of course, pay attention to synchronization. 2. Wait () in class synchronization () must consider good logic, otherwise it may cause blocking. 3. If multiple threads call or now do not know how many threads are communicating, the best way is to implement one Listener, then call an instance method of the class call Listener to communicate. Working principle: 1) Listener interface provides synchronization method such as syndata (); 2) Synchronous thread provides a method of adding and deleting Listener, while performing a rotation through the class of Listener in the thread; 3) Use the thread class to synchronize data, Inherit the Listener interface, implement its method, send the data that is about to end to the synchronous thread; in fact, this principle comes from Java Swing technology. Due to the time relationship, I will talk about it today, I hope to throw bricks! ! THank you for everyones suggestions!