We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69ebde0 commit 7852cbaCopy full SHA for 7852cba
1 file changed
Thread/PriorityMain.java
@@ -0,0 +1,19 @@
1
+class PriorityMain extends Thread
2
+{
3
+ public void run()
4
+ {
5
+ System.out.println("The current thread name is: " + Thread.currentThread().getName());
6
+ }
7
+ public static void main(String args[])
8
9
+ PriorityMain th1 = new PriorityMain();
10
+ PriorityMain th2 = new PriorityMain();
11
+ PriorityMain th3 = new PriorityMain();
12
+ th1.setPriority(MIN_PRIORITY);
13
+ th2.setPriority(NORM_PRIORITY);
14
+ th3.setPriority(MAX_PRIORITY);
15
+ th1.start();
16
+ th2.start();
17
+ th3.start();
18
19
+}
0 commit comments