title: Why is this printing the memory address of array
body: <p>So this first code returns the memory address of the integer array, but I want it to print out the actual array.</p>
  
  <pre><code>import java.util.Arrays;
  public class FinalsReview{
  int[] list = new int[]{12, 435,546, 7, 24, 4, 6, 45, 21, 1};
  public static void main(String[]args){
      FinalsReview hello = new FinalsReview();
      System.out.print(hello.create());
  }
  public int[] create(){
      Arrays.toString(list);
      return list;
      }
  }
  </code></pre>
  
  <p>However, the following code prints the actual array.</p>
  
  <pre><code>import java.util.Arrays;
  public class FinalsReview{
  int[] list = new int[]{12, 435,546, 7, 24, 4, 6, 45, 21, 1};
  public static void main(String[]args){
      FinalsReview hello = new FinalsReview();
      hello.create();
  }
  public void create(){
      System.out.println(Arrays.toString(list));
      }
  }
  </code></pre>
  
  <p>Why does the first one return the memory address?</p>