title: Java using an array from another class
body: <p>I'm new to Java so please be gentle...</p>
  
  <p>Consider the following <code>ShoppingList Class</code>:</p>
  
  <pre><code>public class ShoppingList {
  ...
      public ItemPrices[] getSortedPrices(){
          //do sorting stuff here etc
          return ret.toArray(new ItemPrices[0]);
      }
  }
  </code></pre>
  
  <p>And now I have another class called <code>Hello</code>:</p>
  
  <pre><code>public class Hello {
  ...
      private Groceries createGroceries() {
      ...
           pricearray[] =  ShoppingList.ItemPrices[] //????
      ...
      }
  }
  </code></pre>
  
  <p>I want to assign the array pricearray I've created to equal to ItemPrices array returned in the method.</p>
  
  <p>However I'm not getting what I want, what's the correct way to doing this?</p>