标签:getname ide pre override public java 多线程 system rri new t
public class ThreadTest { public static void main(String[] args) { Test test1 = new Test(); Test test2 = new Test(); test1.start(); test2.start(); for (int t = 0; t < 100; t++) { System.out.println(Thread.currentThread().getName() + " run " + t); } } } class Test extends Thread { @Override public void run() { for (int i = 0; i < 100; i++) { System.out.println(Thread.currentThread().getName() + " run " + i); } } }
标签:getname ide pre override public java 多线程 system rri new t
原文地址:https://www.cnblogs.com/smartsmile/p/11605270.html