package com.example.domain;

public class TestRunnable {

	public static void main(String[] args) {
		// create thread object (worker) and assign runnable (job)
		
		// create runnable object first
		MyRunnable r1 = new MyRunnable();
		
		// create thread and assign runnable object
		Thread t1 = new Thread(r1, "t1");
		
		// create another thread
		Thread t2 = new Thread(r1);
		t2.setName("t2");
		
		// create yet another thread
		Thread t3 = new Thread(r1, "t3");
		
		// start the thread
		t1.start();
		t2.start();
		t3.start();
	}

}
