16 - Multithreading
16 - Multithreading
to Threads
Introduction to Threads
Learning Objective
Creating Threads
Thread States
Runnable Interface
Priority of Thread
Interrupting Threads
ThreadGroup
Introduction of Thread
A thread is a single sequential flow of control within a
program.
o/p
Message from First Thread : 1
Message from First Thread : 2
.
Message from First Thread : 10
Priority Of Thread
Priorities are represented by a number between 1 and
10.
Syntax