The role of the Java getid () method

package ch14;
public class Test15
{
    public static void main(String[] args)
    {
        Thread runThread=Thread.currentThread();
        System.out.println("当前线程名称:"+runThread.getName());
        System.out.println("当前线程标识:"+runThread.getId());
    }
}
当前线程名称:main
当前线程标识:1
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>