First I wanted to ask [Why does Java prohibit static fields in inner classes?](https://stackoverflow.com/questions/1953530/why-does-java-prohibit-static-fields-in-inner-classes), but the question is already there. The reason I gave for needing them (`serialVersionUID`) was eliminated by the answer by Bozho. However, I'm still curious:

**Are static fields prohibited only in the source code or also in the class file?**

Btw., a convincing reason why this is prohibited is yet to be invented. In C there are static variables allowed even inside of functions. Their lifespan is the same as of any other static variable, just their visibility is different. The same would work in Java, too.