title: Using the keyword "new" in a return statement
body: <p>I have never seen the keyword "new" used in a return statement and my understanding of new is that it creates a new object. And "new" used in this context <code>Practice permutation = new Practice();</code> is that it creates a new object called <code>permutation</code>. And <code>permutation</code> is a reference to some memory address. So maybe, <code>return new String(content)</code> is return a memory address? So my question is, what does <code>new</code> used in this context actually mean? I apologize for my noob question...</p>
  
  <pre><code>import java.util.Arrays;
  
  public class Practice {
      public String sort(String s) {
          char[] content = s.toCharArray(); 
          Arrays.sort(content);
          return new String(content);
      }
  
      public static void main(String[] args){
          Practice permutation = new Practice(); 
          System.out.println(permutation.sort("hello"));
      }
  }
  </code></pre>