Added 3rd program

This commit is contained in:
Aditya Tiwari
2026-01-23 14:50:11 +05:30
parent 725861a154
commit 390362a10c
3 changed files with 14 additions and 0 deletions

BIN
TestMultiPriority1.class Normal file

Binary file not shown.

14
TestMultiPriority1.java Normal file
View File

@@ -0,0 +1,14 @@
class TestMultiPriority1 extends Thread{
public void run(){
System.out.println("name of running thread is :" + Thread.currentThread().getName());
System.out.println("running thread priority is:" + Thread.currentThread().getPriority());
}
public static void main(String args[]){
TestMultiPriority1 m1 = new TestMultiPriority1();
TestMultiPriority1 m2 = new TestMultiPriority1();
m1.setPriority(Thread.MIN_PRIORITY);
m2.setPriority(Thread.MAX_PRIORITY);
m1.start();
m2.start();
}
}

BIN
src/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB