201671010119 2016-2017-2 "Java program Design" 17th Week learning experience

Source: Internet
Author: User
Tags thread class

This week the teacher explained the 14th chapter, and at the beginning the teacher gave a quiz on the content of last week's study. I got it. (1) Java creates threads in two ways: to create subclasses that inherit the thread class and to create classes that implement the Runnable interface; (2) Once a thread in Java is created, it cannot automatically start running, it must call the Start method, and (3) the thread is not a program. Each task is called a thread, the thread is a dynamic feature, and the program is a static feature. (4) A thread is a single execution flow of a program, multithreading is a program of multiple execution streams, multithreading is used to implement concurrency.

In the Friday experiment class, the teacher combined with the textbook program on the 14 chapters of the Concurrency of knowledge points to do a detailed explanation. I know through the teacher's explanation. Sleep (), wait () is two commonly used methods that cause thread blocking; Before a thread is started, the Setdaemon method is called to convert the thread to a daemon thread. After the lesson, through the Teacher programming task implementation, the thread has a deeper understanding. For programming task Two, the program can run, that is, the results of the teacher asked a little gap, is actively resolved.

201671010119 2016-2017-2 "Java program Design" 17th Week learning experience

Related Article

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.