java——简单多线程

2019年2月17日19:11:54 发表评论 1,165 views

发现个好东西: 一个免费短链生成项目:“ https://www.isok.co”一个可以生成所有短链的服务,isok.co的这个含义能覆盖所有短链含义isok, 我试过了很不错,都可以试试

/**
 * Created by xabcd on 2019/2/17.
 */
public class test_thread
{
    public static void main(String args[])
    {
        new testread().start();
        for(int i = 0;i<10;i++)
        {
            System.out.println("main函数正在运行!");
        }
    }
}
class testread extends Thread
{
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println("run函数正在运行");
        }
    }
}

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: