Learn Core Java - Series 2
- 9.7
- Programming
- 7 Episodes
- 1 hr 35 minutes
- Framed By : Floyd Lover
EP 5 - Java Thread - How to create , start and stop
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 guides how to create, start, pause, stop and join threads with simplistic coding examples.
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
Content Source : https://www.youtube.com/@JakobJenkov
Reviews
3There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text.
There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text.
There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form, by injected humour, or randomised words which don't look even slightly believable. If you are going to use a passage of Lorem Ipsum, you need to be sure there isn't anything embarrassing hidden in the middle of text.