I am trying to skip values using a for loop. Something like
for(int i = 32; i <= 255 - but skip 128 to 159; i++) {
char ascii = (char) i;
System.
just for completeness, this is also possible
for (int i = 32; i <= 255; i = (i == 127 ? 160 : i + 1)) {
char ascii = (char) i;
System.out.println(ascii);
}
I would make two loops :
int MIN = 128;
int MAX = 159;
for(int i = 32; i < MIN ; i++) {
char ascii = (char) i;
System.out.println(ascii);
}
for(int i = MAX + 1; i < 255; i++){
char ascii = (char) i;
System.out.println(ascii);
}