I have an int variable and I want to limit the values it can have. For example, I have
int example = 5;
and I want to apply restrictions so that can't be changed into a value higher than 8 or lower than 2. Do you have an idea of how I could make this possible?