1.Multithreading in Java a simple Introduction.

preview_player
Показать описание
class useThread extends Thread
class useThread implements Runnable
Threads are a flow of execution. All programs use threads, and you have already constructed a progam that uses a single thread. However, multi threading is more complex. In this section, you will learn why and when to use threads, and, of course, how. The threading concept is pretty easy to understand, and so it should not take too long.

If you create a thread, you need to have 2 classes where one is using the other. To take advantage of threads, the two classes must be able to run at exactly the same time. This simultaneous execution is called concurrency.

Рекомендации по теме