title: Reverse a string using a recursive void method
body: <p>So I'm trying to write a method that reverses a given string but the catch is that it has to be a void method rather than a return method which is making this difficult. My code seems logical to me but it doesn't work so I'm hoping someone can help me figure out where I'm going wrong.</p>
  
  <pre><code>public class Reverser {
  
  public String text, revText;
  
  /**
   * @param args
   */
  public static void main(String[] args) {
      Reverser greeting = new Reverser("Buildings");
      greeting.reverse();
      System.out.println(greeting.getText());
  
  }
  
  public Reverser(String _text){
      text = _text;
  }
  
  public void reverse(){
      int len = text.length();
      if(len &gt;= 1){
          String last = text.substring(text.length() - 1, text.length());
          revText += last;
          text = text.substring(0, text.length() - 1);
          Reverser loop = new Reverser(text);     
          loop.reverse();         
      }
  }
  
  public String getText(){
  
      return revText; 
  }
  
  }
  </code></pre>