Java multithread

来源:互联网 发布:安卓程序员好找工作吗 编辑:程序博客网 时间:2024/04/29 03:57

1. Two form of new thread declaration:

extends Thread, or implements a Runnable interface.

2.run() is the execute code.

3.start() is the start button.

4.Use isAlive() to determine is the thread has ended.

5. Use join() to wait a thread.

6. setPriority() sets priority.

7. synchronized(objref) block, wait(), notify().

synchronized(this) {

suspend,stop,resume control

}

0 0
原创粉丝点击