thread and instantiating thread in java
TRANSCRIPT
Thread and Instantiating Thread in Java
In this blog we will learn about importance of Thread class in java and instantiating thread. Every java program consists at least one thread i.e. the main thread.
The Java Virtual Machine always creates a main thread and calls the main method in the java program when ever we start our java program.
Thread and instantiating Thread:
A thread is a single point of execution. A thread can not run on it's own rather it runs within a program. In Java there are two ways in which we can create thread mentioned as below:
1. We can create a thread by creating an object of a Thread class.2. We can implement an interface named as Runnable.
Thread class:
The “Thread” class provide methods that help to perform different operations on a thread. Below are some commonly used constructors that are used to create an object of a thread. Thread() : It is a default constructor
For more important & helpful Java Programming learning resources click here Thread and instantiating thread in java
Apart from this, you can also ask questions & look for various Java Programming queries along with their solutions including DotNet, PHP, JavaScript & Java Programming Blogs etc as it is an effective technology forum also.