title: How to reverse a string that has already been reversed?
body: <p>I made a program that lets a user enter in a word or a phrase or a sentence and reverse it and display the result. </p>
  
  <p>My issue is that when I run it it does reverse it but it reverses the words when all I want to do is keep the words as they were inputted and just reverse them.</p>
  
  <p>Here is what I have currently </p>
  
  <pre><code>//import statements
  import java.util.*;     //for scanner class
  
  
  // class beginning
  
  class  WordReverser {
  public static void main(String[] args ) {
  
      //Declare variables area
      String original, reverse = "";
      Scanner in = new Scanner(System.in);
      boolean blankString = false;
      public StringBuilder reverse();
  
      // beginning message to user to explain the program
      System.out.println("Welcome to my reverse word program!");
      System.out.println("Please enter in a word or a phrase and see it reversed: ");
  
      //main code and calculations to do
      while (!blankString){
          System.out.println("Enter a string to reverse");//Collect inputs from user.
          original = in.nextLine();
          if (original.equals(""))
          {
              blankString = true ;
          }
          else {
              int length = original.length();
  
              for ( int i = length - 1 ; i &gt;= 0 ; i-- )
                  reverse = reverse + original.charAt(i);
  
              System.out.println("Reverse of entered string is: "+reverse);//Output results here
          }
      }
  
      //End program message
      System.out.println();
      System.out.println("Hope you enjoyed using this program!");
  }// end main method
  
  
   }// end class
  </code></pre>