+ 2
Why this java program of multithreading not working?
I have used java.lang.Thread here. https://code.sololearn.com/cPq7Q3XpYH81/?ref=app
1 Resposta
+ 3
The problem is that you defined your own class Thread (the one that contains the main method). You're implementing your self-defined class instead if the Java class Thread (which implements runnable so that you can use it's start method, your self-defined class doesn't implement Runnable, so the start method is unavailable).
Rename it and the code works fine.