线程的默认命名

package service;

import java.util.stream.IntStream;

/**
* @description:
* @author:
* @create:
**/

public class ThreadDefaultName {
public static void main(String[] args) {
IntStream.range(0, 5).boxed().map(i -> new Thread(
() -> System.out.println(Thread.currentThread().getName())
)).forEach(Thread:: start);
}
}
原文地址:https://www.cnblogs.com/herosoft/p/9473383.html