import java.io.*;
//多线程编程
public class multithread
{
public static void main(string args[])
{
system.out.println("我是主线程!");
//下面创建线程实例thread1
threaduseextends thread1=new threaduseextends();
//创建thread2时以实现了runnable接口的thhreaduserunnable类实例为参数
thread thread2=new thread(new threaduserunnable(),"secondthread");
thread1.start();//启动线程thread1使之处于就绪状态
//thread1.setpriority(6);//设置thread1的优先级为6
//优先级将决定
闽公网安备 35060202000074号