Thread.currentThread().getName() 表示当前代码被哪个线程调用
this.getName() 表示当前线程(当前这个这段代码属于哪个线程里边的)

1 线程实体
Thread.currentThread().getName() 和 this.getName()的区别
2 测试类
Thread.currentThread().getName() 和 this.getName()的区别

相关文章: