Grow your YouTube views, likes and subscribers for free
Get Free YouTube Subscribers, Views and Likes

Java Threads - Creating starting and stopping threads in Java

Follow
Jakob Jenkov

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/javaconc...

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  

posted by barbolasblogzi