This code seems like it should remove the spaces, it removes everything but the lowercase letters like I want, but for some reason the spaces stay. What am I doing wrong?
for(int i = 0; i < message.length(); i++){
if((int) message.charAt(i) > 122 || (int) message.charAt(i) < 97)
message = message.replace(message.charAt(i), Character.MIN_VALUE);
}
String msg = message.replaceAll("\s", "");