I was studing about String and i cant understand why some characters have changed to Uppercase and other to LowCase.
Here the code :
----------------------------------------------------------------------------
public class StringsDemo {
public static void main(String[] args) {
String palindrome = "Dot saw I was Tod";
int len = palindrome.length();
StringBuilder dest = new StringBuilder(len);
for (int i = (len - 1); i >= 0; i--) {
dest.append(palindrome.charAt(i));
}
System.out.println(dest.toString());
}
}
----------------------------------------------------------------------------
The output from this program is:
doT saw I was toD
----------------------------------------------------------------------------
WHY NOT "Dot saw I was Tod" ?
Thanks,
Fred.
[ June 15, 2005: Message edited by: Frederico Werly ]