20165313 "Java Programming" eighth week study summary

Textbook learning summary

Thread common methods

1.start()
2.run() defines the operation performed after the thread object is scheduled
3.sleep(int millsecond), the sleep method must be called in the try-catch block
4.sAlive()

thread synchronization

thread union

There are three ways to create a thread, they are:

1. Inherit the Thread class to create a thread. If you want to get the current thread object in the program, you can use the method: Thread.currentThread(); if you want to return the name of the thread, you can use the method: getName();
2. Implement the Runnable interface to create Thread
3. Create thread using Callable and Future

code hosting

Detailed explanation of wrong questions

The hostname can be localhost or 127.0.0.1 if the MySQL server and the MySQL Administration Tool reside on the same computer.
My answer: false
Correct answer: true
Resolution:
P325 on the book (If the MySQL server and the MySQL Administration Tool reside on the same computer, the hostname can be localhost or 127.0.0.1.) You
are not careful enough to choose, pay attention next time .

learning feelings

No matter which course I study, meticulousness is an indispensable quality. The reason why I did not get good grades in the last test was that I was not meticulous enough, so I must be more careful in my future studies.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324628122&siteId=291194637