Original Post
Why is this giving me an error? it says that the code is unreachable whatever that means
[source lang="java"] public class CreateDOTS extends Thread //create new dots every 10 seconds at random points on the screen
{
public void run()
{
while(true)
{
repaint();
int randomx = (int)(Math.random() * 399 + 1);//create random x
int randomy = (int)(Math.random() * 399 + 1);//create random y
}
try
{
Thread.sleep(5000);
}catch(InterruptedException e){}
}
}[/source
[source lang="java"] public class CreateDOTS extends Thread //create new dots every 10 seconds at random points on the screen
{
public void run()
{
while(true)
{
repaint();
int randomx = (int)(Math.random() * 399 + 1);//create random x
int randomy = (int)(Math.random() * 399 + 1);//create random y
}
try
{
Thread.sleep(5000);
}catch(InterruptedException e){}
}
}[/source