CS 1713 Introduction to Computer Science -- Spring 2001
Practice Problem on Strings

Write a code segment that will take a String and use the charAt method to create another string that is just the first one written backwards. Thus given "Mississippi", your segment would produce "ippississiM".

[Hint: Recall that if we have String s = "Mississippi"; then s.charAt(2) returns the character 's' since it is the char in position 2, where the counting starts at 0.

For this problem, use a for loop and charAt to go through each character in the string s (from position 0 to position s.length() - 1. Then use + to concatenate each of these characters onto another string at the left end. This new string should initially just be the empty string ""]