I've just started with greenfoot and I'm following the tutorial. At one point it says to add:
But when I do it gives me a class, interface, or enum expected error. I don't see any out of place brackets, but I am new so I could be missing something.
And can someone explain what "public void" means? Thanks!
/**
* Turn in a random direction.
*/
public void turnRandom()
{
// get a random number between 0 and 3...
int turns = Greenfoot.getRandomNumber(4);
// ...an turn left that many times.
for(int i=0; i<turns; i++) {
turnLeft();
}
}

