public static void main(String[] args) throws InterruptedException {
Runnable same=new CheckSame();
Thread t=new Thread(same,"ssss");
t.getName();
t.start();
}
@Override
public void run() {
getName();//Thread
Thread.currentThread().getName();//runnable
}
runable怎么获取线程名字getname和setname
猜你喜欢
转载自blog.csdn.net/sunyufeng22/article/details/121022911
今日推荐
周排行