Is there a limit to how many fields can be declared in a Java class? This question addresses the number of arguments of a method, but I am curious knowing if a Java class has any limit, and what is this limit.
This is just out of curiosity - I wouldn't actually declare a class with thousands of fields.