Originally Posted by superklye
Could you perhaps break the string down into characters and put them into an array in their correct order then make a for loop the traverses the array in reverse?
That's kind of what I'm trying to do now.
Here's an example of how I did the other reverse one. In the real program the user enters the message to be encrypted but this gives you a general idea of it.
Maybe if I could do something like an if statement that executes when the current char is an empty space then reverse that, add it, and move on to the next char etc. What would be the best way to compare char to an empty space though?
StringBuilder text1 = new StringBuilder() ;
String word = "the quick brown fox" ;
for (int i = 0; i < word.length() ; i++)
char ch = word.charAt(i);
text1 = text1.reverse();