fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. ThreadGroup g1=new ThreadGroup("t");
  13. Thread t1=new Thread(g1,"first");
  14. System.out.println(t1.getPriority());
  15. Thread t2=new Thread(g1,"first");
  16. System.out.println(t2.getPriority());
  17. g1.setMaxPriority(3);
  18. Thread t3=new Thread(g1,"first");
  19. System.out.println(t3.getPriority());
  20. }
  21. }
Success #stdin #stdout 0.08s 49048KB
stdin
Standard input is empty
stdout
5
5
3