忧伤楼房

文章
7
资源
0
加入时间
4年2月6天

getId()方法的作用

getId() 方法的作用非常简单,就是取得正在运行线程的唯一标识。如下代码演示了 getId() 方法的使用:public class Test15{ public static void main(String[] args) { Thread runThread=Thread.currentThread(); System.out.println("当前线程名称:"+runThread.getName()); Sys