I am trying to increment a variable from 0-99, and return the value each time, but I'm unsure how i could do this. This is the code i have so far:
public int getValue()
{
if (currentState == COUNTING)
{
for (int i = 0; i <= 99; i++)
{
value = i;
}
return value;
} else {
return super.getValue();
}
}
I'm not sure how I could modify this, as at the moment it is returning 99. I know why, but do not know how to accomplish what i am trying to do.