T
The DUDE
In terms of comparing to characters would there by a reason to use
a byte or a char?
byte[] s = string.getBytes(); // Or: char[] s = string.toCharArray();
int length = s.length;
byte b = 0; // or char b
for (int i = 0; i < length; i++) {
b = s;
if ((b >= 'a') && (b <= 'z')) {
// do something
}
}
a byte or a char?
byte[] s = string.getBytes(); // Or: char[] s = string.toCharArray();
int length = s.length;
byte b = 0; // or char b
for (int i = 0; i < length; i++) {
b = s;
if ((b >= 'a') && (b <= 'z')) {
// do something
}
}