1class TestMultiPriority1 extends Thread{
2 public void run(){
3 System.out.println("running thread name is:"+Thread.currentThread().getName());
4 System.out.println("running thread priority is:"+Thread.currentThread().getPriority());
5
6 }
7 public static void main(String args[]){
8 TestMultiPriority1 m1=new TestMultiPriority1();
9 TestMultiPriority1 m2=new TestMultiPriority1();
10 m1.setPriority(Thread.MIN_PRIORITY);
11 m2.setPriority(Thread.MAX_PRIORITY);
12 m1.start();
13 m2.start();
14
15 }
16}