I\'m getting an error: The method sleep(int) is undefined for the type Thread. I thought the sleep method is in the Thread class in Java.
import java.util.Ra
The reason you're getting this is that you've implemented your own Thread class. In your class there is no sleep method.
First prize would be to avoid using class names that are part of the standard Java libraries.
If you insists to keep the names, use java.lang.Thread.sleep(...) to specify that you want the Thread class that Java provides.