class MyThread implements Runnable 
{
	public void run() //only method in Runnable, need to override
	{
		for(int i=0;i<2;i++)
		{
			System.out.println(Thread.currentThread().getName()+ " @javaskool.com "+i);
		}
	}
}
class ThreadPriorityExample 
{
	public static void main(String[] args) 
	{
		Thread t=Thread.currentThread();
		System.out.println(t);
				
		Thread t1=new Thread(new MyThread(),"Tom");
		Thread t2=new Thread(new MyThread(),"Jerry");
		Thread t3=new Thread(new MyThread(),"You");
		
		t1.setPriority(Thread.MAX_PRIORITY);
		t2.setPriority(Thread.MIN_PRIORITY);
		t3.setPriority(Thread.NORM_PRIORITY);

		System.out.println(t1);
		System.out.println(t2);
		System.out.println(t3);

		t1.start();
		t2.start();
		t3.start();
	}
}