title: multiple objects with same name
body: <p>With the code below, three objects with the same name are created. How can I call upon one of them to print out its values?</p>
  
  <pre><code>import java.util.Scanner;
  
  class ProcessPurchases {
      public static void main(String args[]) {
          Scanner myScanner = new Scanner(System.in);
          Purchase aPurchase;
  
          for (int count = 0; count &lt; 3; count++){
              aPurchase = new Purchase();
              aPurchase.amount = myScanner.nextDouble();
              aPurchase.quantity = myScanner.nextInt();
          }
      }
  }
  </code></pre>