t1.setPriority(Thread.NORM_PRIORITY) 是设置优先级的。你看一下hread.NORM_PRIORITY定义.public final static int NORM_PRIORITY = 5; 是final的不能改变其值。

解决方案 »

  1.   


    setPriority
    public final void setPriority(int newPriority)更改线程的优先级。 
    首先调用线程的 checkAccess 方法,且不带任何参数。这可能抛出 SecurityException。 在其他情况下,线程优先级被设定为指定的 newPriority 和该线程的线程组的最大允许优先级相比较小的一个。 
    参数:
    newPriority - 要为线程设定的优先级 
    抛出: 
    IllegalArgumentException - 如果优先级不在 MIN_PRIORITY 到 MAX_PRIORITY 范围内。 
    SecurityException - 如果当前线程无法修改该线程。
    另请参见:
    getPriority(), checkAccess(), getThreadGroup(), MAX_PRIORITY, MIN_PRIORITY, ThreadGroup.getMaxPriority()
    可以  t1.setPriority(3); 或给其他int 值
      

  2.   

    /**
         * The default priority that is assigned to a thread.
         */
        public final static int NORM_PRIORITY = 5;
      

  3.   

    Thread.NORM_PRIORITY一般指主线程的优先级