Common knowledge accumulation of "Java Basics"

Source: Internet
Author: User

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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.