慕田峪4524236
直接上代码:public class Test { public static void main(String[] args) { for (int i = 0; i < 3; i++) { Thread thread = new Thread(); thread.start(); System.out.println(thread.getName()); } }}// 运行结果:// Thread-0// Thread-1// Thread-2如果你要指定名字,你应该这样来做:public class Test { public static void main(String[] args) { Thread thread = new Thread("我的线程"); thread.start(); System.out.println(thread.getName()); }}//运行结果://我的线程