I need to create a for loop starting at 305 and ending at 397.
for (int i = 305; i < 397; i++) {
//do stuff
}
The problem is, I need to skip 310, 321, 332, 343, 354, 365, 376, and 387.
I know I can do this by placing the following in the loop:
int[] skip = { 310, 321, 332, 343, 354, 365, 376, 387 };
for (int i2 : skip) {
if (i != i2) {
//do stuff
}
}
But I feel like there is a much more efficient, clean way to achieve this.