Note that your "static class" might not do what you expect (remember that classes in a .pde file are
nested classes -- in the sketch class!).
Having just the members static is enough.
Some people will deliberately inherit from the World as a constant provider, because it is convenient: constants are available without prefix. But as you guessed, it isn't very satisfying conceptually, as a Ball isn't a World, and it would prevent you from inheriting another class.
Other people would transform the World class to an interface (thus making the constants final, ie. effectively constant, not what you want I guess), to avoid the inheritance lock.
But the best way is probably just to add World as a member of your Ball class: all the balls will have a reference to the world (they know what it is). Look tutorials on difference between
is-a and
has-a.
Actually, there is another way, to refer the World directly, since its members are all static.
I know these concepts might seem abstract and hard to grasp at first (I come from the procedural world too), but after a while, looking at (good) programs and tutorial, and practicing, it will become intuitive...
PS.: I am not too sure, but I think the statics variables inherited from World are actually shared among instances of ball: if you change one, you will change the others.
So you have two different but roughly equivalent ways of doing this:
class Ball with static World w
You have to get a reference to the (singleton) World instance.
use the constants as w.GRAVITY.
Or simpler, no World member in Ball, just refer to them:
World.GRAVITY