title: Returning string array to the method and print returned array
body: <p>How can I return a <code>string[]</code> from a method:</p>
  
  <pre><code>public String[] demo
  {
    String[] xs = new String {"a","b","c","d"};
    String[] ret = new String[4];
    ret[0]=xs[0];
    ret[1]=xs[1];
    ret[2]=xs[2];
    ret[3]=xs[3];
  
    retrun ret;
  }
  </code></pre>
  
  <p>Is this right, because I tried it and it didn't work. How can I print this returned string array in main method.</p>