JAVA
java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
public class Program extends Thread
{
public void run()
{
System.out.println(Thread.currentThread().getPriority());
System.out.println ("hello");
}
public static void main(String[] args)
{
Thread.currentThread().setPriority(MAX_PRIORITY);
System.out.println(Thread.currentThread().getPriority());
Program sc=new Program () ;
sc.setPriority(MIN_PRIORITY);
sc.start();
}
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run