Java Threads - Creating, starting and stopping threads in Java

Publié le: 15 June 2020
sur la chaîne: Jakob Jenkov
184,915
4.1k

A Java Thread is like a virtual CPU that can execute part of your Java application in parallel with the application main Java thread. This Java Thread tutorial explains how to create, start, pause, stop and join threads in Java.

Chapters
0:00 Java Threads Introduction
0:24 Create and start a Java Thread
0:50 The four ways to specify what code a Java Thread should execute
1:49 Create a subclass of the Java Thread class
2:47 Create a class that implements the Runnable interface
3:37 Implement the Runnable interface with an anonymous class
4:21 Implement the Runnable interface with a Java Lambda Expression
5:29 Obtain reference to currently executing Thread
5:56 Get and set Thread name
6:33 Start multiple threads
7:24 Thread.sleep() - pause a thread for a specified number of milliseconds
8:09 Stop a Java Thread
11:33 Mark a Java Thread as a Daemon thread
13:23 Join a thread - wait for the Java Thread to terminate
15:01 OS level threads and user space level threads

Java Threads tutorial - textual version:
http://tutorials.jenkov.com/java-conc...

Java Concurrency and Multithreading - video playlist:
   • Java Concurrency and Multithreading  

Java Lambda Expressions tutorial - text / video playlist
http://tutorials.jenkov.com/java/lamb...
   • Java Lambda Expressions  


Sur cette page du site, vous pouvez voir la vidéo en ligne Java Threads - Creating, starting and stopping threads in Java durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Jakob Jenkov 15 June 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 184,915 fois et il a aimé 4.1 mille téléspectateurs. Bon visionnage!