class priorityexample {
public static void main(String[] args) {
Thread t1=Thread.currentThread();
System.out.println("this thread :"+t1.getName());
System.out.println("t1 priority :"+t1.getPriority());
Thread t2=new Thread();
System.out.println("t2 priority :"+t2.getPriority());
t1.setPriority(8);
Thread t3=new Thread();
System.out.println("t3 priority :"+t3.getPriority());
}
}