This code is supposed to add a 'DemonSpider' to the world every five seconds:
public void addEnemy()
{
int y = Greenfoot.getRandomNumber(getHeight());
addObject(new DemonSpider(),getWidth(),y);
wait(5);
}
I get this in the output:
unreported exception java.lang.InterruptedException; must be caught or declared to be thrown

