What is a thread in Java?

A thread in Java is the smallest unit of execution within a process. It allows a program to perform multiple tasks concurrently, improving responsiveness and better utilizing system resources.

Key Points

Example

In a web application, one thread may process a user request while another thread handles database operations simultaneously, improving overall responsiveness.

class MyThread extends Thread {

    @Override
    public void run() {
        System.out.println("Thread is running");
    }
}

public class Main {

    public static void main(String[] args) {
        MyThread thread = new MyThread();
        thread.start();
    }
}

Interview Tip

A concise interview answer is

A thread is the smallest unit of execution in Java. It enables concurrent execution of tasks within a process, allowing applications to perform multiple operations simultaneously and utilize system resources more efficiently.

Last updated: 16 July 2026

Previous question: What are exceptions in Java?

Next question: What is the difference between == and equals() in Java?

More Core Java - Level I interview questions

All Core Java - Level I questions