I still don't understand final and static
I may read the tutorial several times
can you explain them to me and tell me how to use them with short examples?
thank you
public class MyWorld extends greenfoot.World
{
public static int WIDE = 11, HIGH = 7;
public MyWorld()
{
super(WIDE, HIGH, 40);
prepare();
}public void act()
{
// create new larger world when clicked
if (Greenfoot.mouseClicked(this) && MyWorld.WIDE < 21)
{
MyWorld.WIDE += 2;
Greenfoot.setWorld(new MyWorld());
}
}