I have a class that stores a large number of int
member variables, each defined as follows:
public final static int int1 = int1value;
public final static int int2 = int2value;
...
public final static int int106 = int106value;
There is a second class that needs to do a loop based on the number of int
s in the first class. How would I go about adding a function to the first class to count these member variables?
Don't bother with a function, just hard code 106 in whatever would uses them. It couldn't make your design any worse.