相关疑难解决方法(0)

Java:Thread.currentThread().sleep(x)vs. Thread.sleep(x)

我的代码中有这个

Thread.currentThread().sleep(x);
Run Code Online (Sandbox Code Playgroud)

Eclipse告诉我使用静态

Thread.sleep(x); 
Run Code Online (Sandbox Code Playgroud)

相反,为什么?有什么区别,这两种方法之间的功能有什么不同吗?

java eclipse multithreading warnings sleep

83
推荐指数
2
解决办法
7万
查看次数

标签 统计

eclipse ×1

java ×1

multithreading ×1

sleep ×1

warnings ×1