How to use static variables in Processing?

That’s correct, at least in reference to processing. I think standard java doesn’t have this limitation.

Final is the equivalent of const, and defines a variable as unchangeable. Removing final should cause no problem to your original request. Just note you can use final, private public and protected. Read more about these on the java ref if you want to find out more.