multi threading in java

Publié le: 21 octobre 2020
sur la chaîne: Daily Tech Talks
58
4

Multithreading is a Java feature that allows concurrent execution of two or more parts of a program for maximum utilization of CPU. Each part of such program is called a thread. So, threads are light-weight processes within a process.

Threads can be created by using two mechanisms :
1. Extending the Thread class
2. Implementing the Runnable Interface

Java is a multi-threaded programming language which means we can develop multi-threaded program using Java. A multi-threaded program contains two or more parts that can run concurrently and each part can handle a different task at the same time making optimal use of the available resources specially when your computer has multiple CPUs.

By definition, multitasking is when multiple processes share common processing resources such as a CPU. Multi-threading extends the idea of multitasking into applications where you can subdivide specific operations within a single application into individual threads. Each of the threads can run in parallel. The OS divides processing time not only among different applications, but also among each thread within an application.

Multi-threading enables you to write in a way where multiple activities can proceed concurrently in the same program.

Tags- #java, #dailytechtalks, #computerscience, java programming, easy learning, educational channel, #multithreadinginjava, thread, thread lifecycle, synchronisation,


Sur cette page du site, vous pouvez voir la vidéo en ligne multi threading in java durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Daily Tech Talks 21 octobre 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 58 fois et il a aimé 4 téléspectateurs. Bon visionnage!