title: Stringbuilder cannot append white space?
body: <pre><code>import java.util.StringTokenizer;
  
  public class ReverseWords {
      public static void main(String[] args) {
          StringBuilder output = new StringBuilder();
          String str = "This is String , split by StringTokenizer, created by mkyong";
          StringTokenizer st = new StringTokenizer(str);
                  char space =' ';
          System.out.println("---- Split by space ------");
          while (st.hasMoreElements()) {
              //System.out.println(st.nextElement());
                       output.insert(0,st.nextElement());
                       output.append(" ");
          }
  
          System.out.println(output.toString());
          /*System.out.println("---- Split by comma ',' ------");
          StringTokenizer st2 = new StringTokenizer(str, ",");
  
          while (st2.hasMoreElements()) {
              System.out.println(st2.nextElement());
          }*/
      }
  }
  </code></pre>
  
  <p>I'm trying to just reverse the words of a string and here is what I get:</p>
  
  <pre><code>mkyongbycreatedStringTokenizer,bysplit,StringisThis
  </code></pre>