How do you solve the max value problem when using an integer counter, that looks like
counter = counter + 1;
When this reaches the max value, how do you know this happened? Do you add another counter for this counting how often this happened?
My question concerns about java.