Originally Posted by
sselasky1
Just thought of why it's not changing the same character to the opposite case. I thought by specifying the exact location it would only replace that character but it will still replace all the characters to that case. I've been trying to figure this out for the last two days so any suggestions will still be appreciated. Thanks
java.lang.String is immutable - you can't change it - so it might be better to tackle this problem one character at a time and build a new sequence of characters which you can then make into your result String. You can get an array of characters from a String with toCharArray() and use new String(char[]) to convert a char array back to a String. You *can* change the individual chars in a char array. Perhaps that might work better?