I am geting compile time error on this below code whats wrong in this code ? HELP ME.
class Demo
{
public static void main(String[] ar)
{
Thread t=Thread.currentThread();
System.out.print(t);
System.out.println(t.getName());
}
}
I am geting this error
E:\java>javac Demo.java
Demo.java:7: 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.