java.lang.ThreadGroup的getMaxPriority()
函数返回该线程组的最大优先级。这个最大优先级就等于该线程组中新创建线程的最大优先级。
代码示例:
package com.thb;
public class Test5 {
public static void main(String[] args) {
ThreadGroup threadGroup = Thread.currentThread().getThreadGroup();
System.out.println(threadGroup.getMaxPriority());
}
}
运行输出: