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

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

相关文章:

  • 2021-07-04
  • 2022-12-23
  • 2021-06-18
  • 2022-12-23
  • 2021-07-27
  • 2021-10-10
  • 2021-06-16
猜你喜欢
  • 2022-02-20
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案