title: I want to reverse the given string like "This is a program" as "sihT si a margorp" using String array in java with out using string functions?
body: <pre><code>    class Reverse_Word
      {
          public static void main(String args[])
          {
              String s = "This is a program";
              String str[] = s.split(" ");
              String wrd = new String();
              try{
              for(int i=0;i&lt;str.length;i++)
              {
  
                  wrd = str[i];
                  for(int j=wrd.length();j&gt;=0;j--)
                  {
                      String str1[]=wrd.split("//");
                      System.out.println(str1);
                  }
  
              }
  
              }catch(Exception e)
              {
                  System.err.println(e);
              }
          }
      }
  </code></pre>
  
  <p>Now, when I modified the code. Their is no error but getting wrong output like some hashcode
      [Ljava.lang.String;@d70d7a
      [Ljava.lang.String;@b5f53a
      [Ljava.lang.String;@1f6f0bf
      [Ljava.lang.String;@137c60d
      [Ljava.lang.String;@ab853b
      [Ljava.lang.String;@b82368
      [Ljava.lang.String;@11c8a71
      [Ljava.lang.String;@c53dce
      [Ljava.lang.String;@15cda3f
      [Ljava.lang.String;@fc9944
      [Ljava.lang.String;@1b26af3
      [Ljava.lang.String;@8b819f
      [Ljava.lang.String;@eb017e
      [Ljava.lang.String;@aeffdf
      [Ljava.lang.String;@120a47e
      [Ljava.lang.String;@f73c1
      [Ljava.lang.String;@789144
      [Ljava.lang.String;@1893efe</p>