The static method currentThread() from the type Thread shoul
来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/09/13 22:44:41
The static method currentThread() from the type Thread should be accessed in a static way
用静态方式存取 怎么操作?
public static void main(String[] args){
Thread worker=new Thread();
String name = worker.currentThread().getName();
System.out.println(name);
}
其中 worker.currentThread() 出现该警告.
用静态方式存取 怎么操作?
public static void main(String[] args){
Thread worker=new Thread();
String name = worker.currentThread().getName();
System.out.println(name);
}
其中 worker.currentThread() 出现该警告.
它指的是currentThread()方法是个静态方法,用静态方式去访问,不是类的实例去调用.
你可以不管它,或者用Thread.currentThread().getName();
你可以不管它,或者用Thread.currentThread().getName();
The static method currentThread() from the type Thread shoul
The method wiodowClosing() from the type new WindowAdapter()
The method main cannot be declared static; static methods ca
JAVA中出现the method from the type list is deprecated是什么意思
The method IsEmpty(String) is undefined for the type
The method getsession() is undefined for the type HttpServle
The method selectAll() is undefined for the type productDaoI
英语翻译(1.)Class constructor,or type initializer,is the method
在Java中这样报错The method SayHi() is undefined for the type AccpT
android The method getText() is undefined for the type R.str
android求助The method of type must override a superclass metho
哪位英语强人帮翻译下The method for manufacturing a banjo-type axle hou