I am learning Java Programming and I am a beginner. I am in Multithreading Concept now. When I execute the below program, I getting errors like
Errors
X cannot be resolved to a type
X cannot be resolved to a typeThreadX cannot be resolved
at ThreadTest.main(ThreadTest.java:20)
Code
public Class X implements Runnable
{
public void run()
{
for(int i=0;i<=10;i++)
{
System.out.println("\tValue of ThreaadX : "+i);
}
System.out.println("End of ThreadX");
}
}
public class ThreadTest {
public static void main(String[] args) {
X runnable = new X();
Thread Threadx = new Thread(runnable);
ThreadX.start();
System.out.println("END OF THREADX");
}
}
What mistake I did in the Main Method. I getting this error When I tried to create an object 'runnable' of the class X.
Thanks in advance