20165226 2017-2018-4 "Java Programming" 8th Week study Summary

Source: Internet
Author: User
Tags thread class

20165226 2017-2018-4 "Java Program Design" 8th Week study summary textbook Study content summary 12th Chapter
    • There are three ways to create threads, namely:
      • Inherit the thread class to create threads that you can use if you want to get the current thread object: Thread.currentThread() ; If you want to return the name of a thread, you can use the method: getName() ;
      • Implementing the Runnable Interface creation thread
      • Creating threads using callable and future
    • Thread Common methods
      • Start ()
      • Run () defines the actions that are performed after the thread-thread object is dispatched
      • Sleep (int millsecond), you must call the Sleep method in the Try-catch statement block
      • IsAlive ()

        Thread thread = new Thread(target);threrad.start();
    • Thread synchronization
    • Thread Federation

      B.join();
    • Timer thread, Timer class, in javax.swing

Problems in teaching materials learning and the solving process
    • Question 1: See the book P382 mentioned 计时器Timer类,该类在javax.swing包中,java.util包中也有一个名字是Timer类 , create doubts, that java.util and javax.swing in the timer is different?
    • Problem 1 Solution: first read in the book, no relevant information, and then through Baidu to find relevant information, the following conclusions:

    • Question 2: What is the difference between the main thread and the child thread?
    • Problem 2 Solution:

      1.每个线程都有一个唯一标示符,来区分线程中的主次关系的说法。 线程唯一标示符:Thread.CurrentThread.ManagedThreadID;2.UI界面和Main函数均为主线程。3.被Thread包含的“方法体”或者“委托”均为子线程。4.委托可以包含多个方法体,利用this.Invoke去执行。5.也可以定义多种方法体,放在Thread里面去执行。则此方法体均为子线程。注意如果要修改UI界面的显示。则需要使用this.Invoke,否则会报异常。6.Main函数为主线程,id标示符与UI界面主线程相等。
Problems in code debugging and resolution of claims
    • Issue 1: Move the code written in Windows into the virtual machine, and then when compiling the example12_1, there is a little bug, pop up as shown in the interface

    • Issue 1 Solution: Add encoding parameter: javac -encoding gbk ArrayTest3.java , and then run successfully

Code Hosting

Last week's summary of the wrong quiz
    • Easy error Point: Correct answer: A c d E your answer: C d E

      下列属于常用数据库的是 A AccessB XAMMPC .MySQLD .OracleE .SQL Server
    • Easy wrong point: Correct answer: A B Your answer: a b D

      下列属于数据操作语言的是 A insertB updateC createD select
    • Easy error Point: Correct answer: C your answer: D

      接口RowSet继承了接口__,可以调用RowSet中的方法__来填充其数据区。①Statement     ②ResultSet     ③update     ④populate A ①③B ①④C ②③D ②④
Pairing and mutual evaluation
    • Blogs that are worth learning or questions:
      • Elements Comprehensive
      • Very carefully and meticulously.
      • Typography Introduction Beautiful
    • Something worth learning or doing in your code:
      • Concise file Classification in code
      • Very serious.
reviewed the classmates blog and code
    • This week's study of the knot
      • 20165230
      • Pairs of learning content
        • Discuss the application of pair programming, and add some code on the basis of last week's revision.
Other

Through this week's study, I learned to use the thread class or subclass to create threads that enable each process to take turns.

Learning progress Bar
lines of code (new/cumulative) Blog Volume (Add/accumulate) Learning Time (new/cumulative) Important Growth
Goal 5000 rows 30 Articles 400 hours
First week 48/48 1/1 20/20
Second week 390/438 2/3 18/38
Third week 866/1304 1/4 18/56
Week Four 1105/2409 1/5 30/86
Week Five 1229/3196 1/6 20/106
Week Six 1147/4343 2/8 25/131
Seventh Week 1222/3668 2/10 20/151
Eighth Week 284/3930 3/13 20/171

Try to record "planned learning time" and "actual learning time" to see if you can improve your planning skills by the end of the semester. This work is very important and useful in learning.
Formula for time-consuming estimation
: y=x+x/n, y=x-x/n, the number of training, X, Y is close.

Reference: Why is it so difficult to estimate software engineering applications, software engineering estimation methods

    • Planned study time: 30 hours

    • Actual learning time: 18 hours

    • Improved situation:

(See more modern software engineering courseware
Software engineer Competency Self-evaluation table)

Resources
    • Java Learning Notes (8th Edition)

    • Java Learning Note (8th Edition) Learning Guide

20165226 2017-2018-4 "Java Programming" 8th Week study Summary

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.