class MultiThread
{
public static void main(String[] args)
{
System.out.println(Thread.currentThread().getName());
}
}
编译时出现下面的问题:
C:\JavaBar\MultiThread.java:8: cannot access Thread
bad class file: .\Thread.java
file does not contain class Thread
Please remove or make sure it appears in the correct subdirectory of the classpath.
System.out.println(Thread.currentThread().getName());
^
1 error
要是我显示的导入Thread类(import java.lang.Thread;)则编译和运行都可以通过
请问这是什么原因????
{
public static void main(String[] args)
{
System.out.println(Thread.currentThread().getName());
}
}
编译时出现下面的问题:
C:\JavaBar\MultiThread.java:8: cannot access Thread
bad class file: .\Thread.java
file does not contain class Thread
Please remove or make sure it appears in the correct subdirectory of the classpath.
System.out.println(Thread.currentThread().getName());
^
1 error
要是我显示的导入Thread类(import java.lang.Thread;)则编译和运行都可以通过
请问这是什么原因????
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货