You are on page 1of 11

----------------------------------multithreading------------------------------------

what is multithreading in java?

process of executing multiple threads simultaneously.

What is thread in java?

1.A class is known as thread

2.A thread, in the context of Java, is the path followed when executing a program.

3.All Java programs have at least one thread, known as the main thread, which is
created by the Java Virtual Machine (JVM) at the program’s start, when
the main() method is invoked with the main thread

4.In Java, creating a thread is accomplished by implementing an interface and


extending a class. Every Java thread is created and controlled by
the java.lang.Thread class.

5.Facility to allow multiple activities within a single process

6.Referred as lightweight process

7.A thread is a series of executed statements

8.Each thread has its own program counter, stack and local variables

9.A thread is a nested sequence of method calls

10.Its shares memory, files and per-process state

You might also like