public Thread(Runnable target) {
init(null, target, "Thread-" + nextThreadNum(), 0);
}
如果没有给线程指定名字,会默认有一个名字:"Thread-"+自增数字.
例如:
public static void main(String[] args) {
IntStream.range(0,5).boxed().map(i-> new Thread(()->System.out.println((Thread.currentThread().getName())))).forEach(Thread::start);
}