Core Java Tutorials


Introduction

Java Hello World

Java Compilation

JDK New Features

JVM Architecture

Java OOPs Concepts

Java Package

Array

Exception Handling

String

Immutable Class

File Handling

Serialization

MultiThreading

Volatile

Concurrent Package

Collection

Collection Internal

Generics

Cloning

Reflection In Java

Annotation

Class Loader

Java Inner classes

Garbage Collector

JDBC

References In Java

Heap Dump & Thread Dump

/java/java-genericsPrevious             Next

Creating thread using Thread class:-

A thread is a thread of execution in a program. The Java Virtual Machine allows an application to have multiple threads of execution running concurrently.

When a Java Virtual Machine starts up, there is usually a single non-daemon thread (which typically calls the method named main of some designated class.

We can create a thread extending a Thread class as shown in below image.


in above image we have create a thread by extending a Thread class and we are executing the thread's task by instantiating a new thread and starting it using start() method of Thread class at circle 1.


/java/java-genericsPrevious             Next