⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 example9_8.java

📁 《Java程序设计与应用》-张仕斌-源程序 《Java程序设计与应用》-张仕斌-源程序
💻 JAVA
字号:
/*
 * Example9_8.java
 *
 * Created on 2006年10月19日, 上午11:57
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package example9_8;

/**
 *
 * @author Administrator
 */
public class Example9_8 implements Runnable{
    
    /** Creates a new instance of Example9_8 */
    public Example9_8() {
    }
public void run(){
		System.out.println("My Name is "+Thread.currentThread().getName()); 
	} 
	
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Thread t1=new Thread(new Example9_8());
		Thread t2=new Thread(new Example9_8());
		Thread t3=new Thread(new Example9_8());
		t2.setPriority(Thread.MAX_PRIORITY);//赋予最高优先级
		t1.start();t2.start();t3.start();

    }
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -