Let us consider following is our thread:

```
public class HeavyWorkRunnable implements Runnable {

    @Override
    public void run() {
        System.out.println("Doing heavy processing - START "+Thread.currentThread().getName());
        try {
            doDBProcessing();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("Doing heavy processing - END "+Thread.currentThread().getName());
    }

    private void doDBProcessing() throws InterruptedException {
     //   TODO
    }
}

```

And the main method:

```
public class ThreadRunExample {
     public static void main(String[] args){

            Thread t1 = new Thread(new HeavyWorkRunnable(), "t1");
            Thread t2 = new Thread(new HeavyWorkRunnable(), "t2");
            System.out.println("Starting Runnable threads");

            t1.start();
            t2.start();
            System.out.println("Doing main heavy processing - START "+Thread.currentThread().getName());
            System.out.println("Runnable Threads has been started");
        }
}

```

Now the outputs are different at different run times. For example:

**Output1**:  

Starting Runnable threads  

Doing main heavy processing - START main  

Doing heavy processing - START t1  

Doing heavy processing - START t2  

Doing heavy processing - END t2  

Runnable Threads has been started  

Doing heavy processing - END t1  

**Output2**:  

Starting Runnable threads  

Doing main heavy processing - START main  

Runnable Threads has been started  

Doing heavy processing - START t1  

Doing heavy processing - END t1  

Doing heavy processing - START t2  

Doing heavy processing - END t2  

As per my understanding of thread:  

1. Only a single thread can run at a time.  

2. The system chooses threads randomly to run if priorities are not set.  

So, the system should complete the tasks of 'main' thread, then run either t1 or t2. If so, then the output should always contain:  

**Starting Runnable threads  

Doing main heavy processing - START main  

Runnable Threads has been started**
as the first three lines.
I'm not getting what I've missed in my understanding.