1,= = and equals the difference between null and ""
2,15 top Java Multi-threaded face questions and answers
(1), use of join in thread
In many cases, the main thread is generating and starting a child thread, and if a lot of time-consuming operations are to be performed in the sub-thread, the main thread will often end up before the child thread, but if the main thread finishes processing the other transactions, it needs to use the result of the child thread, that is, the main thread needs to wait for the child The join () method will be used at this time.
(2 ), in thread The synchronized and the Lock thing .
(3), deadlock problem in thread
(4), What is the difference between the wait and sleep methods in Java?
Frequently asked questions about a Java thread interview in a phone interview. The biggest difference is that wait waits for the lock to be released while sleep holds the lock. Wait is typically used for inter-thread interaction, and sleep is typically used to pause execution.
Common knowledge accumulation of "Java Basics"