I was not aware you wanted the program to allow inputting of those values to create the world size with. However you accomplish this, it will not be simple. I would create a separate world class to receive the input and create a new Plane object using the given values.
Or more simple and maybe better, might be to allow changing of the values by use of the arrow keys. In your world class act method you could check for arrow keystrokes and just create and activate a new plane object upon detection (if the change in values is within a reasonable range).
* if 'up' is detected, increase AReihen (if not already at maximum value)
* if 'down' is detected, decrease AReihen (if not already at minimum value)
* if 'left' is detected, decrease S (if not already at minimum value)
* if 'right' is detected, increase S (if not already at maximum value)
The code would look something like this:
String key = Greenfoot.getKey(); if (key != null) { int dS = 0, dAR = 0; if ("up".equals(key) && AReihen<20) dAR++; if ("down".equals(key) && AReihen>5) dAR--; if ("right".equals(key) && S<5) dS++; if ("left".equals(key) && S>1) dS--; if (dS != 0 || dAR != 0) { S += dS; AReihen += dAR; Greenfoot.setWorld(new Plane(S, AReihen)); } }