title: Get the list of ordered products from multiple scanner inputs
body: <pre><code>import java.util.*;
  public class PointOfSale extends ProductDisplay
  {   
      public PointOfSale()
      {   System.out.print("\nPurchase Item(y/n)?");
          Scanner sc = new Scanner(System.in);
          String line = sc.nextLine();
          if("y".equalsIgnoreCase(line)){
          OpenOrder();
              }
      }
      //=============================================
      public void OpenOrder() // New Order
      {  
          ArrayList&lt;String&gt; ProductList = new ArrayList&lt;String&gt;();
          ProductList.add("A001");   
          ProductList.add("A002");
          ProductList.add("A003");    
          ProductList.add("A004");
          ProductList.add("A005");
          System.out.print("Select Product Code:");
          Scanner sc = new Scanner(System.in);
          String code = sc.next();
          if(ProductList.contains(code))
          { 
          product.getProduct(code);
            EnterQuantity();      
           }
          else System.out.print("Product Code is Invalid\n"); 
          System.exit(0);}
      //==============================================
      public void EnterQuantity()  //Entering Quantity
      {
          try{
              System.out.print("Enter Quantity:");
              Scanner sc = new Scanner(System.in);
              int quantity = sc.nextInt();
              double amount = quantity * product.getPrice();
              System.out.print("Amount: " + amount);
  
              //add new item
              System.out.print("\nAdd Item(y/n)?");  
              Scanner sc2 = new Scanner(System.in);
              String add = sc2.nextLine();
  
              if("y".equalsIgnoreCase(add)){
                  OpenOrder();
                      }
              else {
                  DisplayOrder();
  
              }
  
  
  
          }
          catch (InputMismatchException nfe)
              {System.out.print("\nInvalid Entry: Input must be a Number.\n"); System.exit(0);}
      }
  
  
      public void DisplayOrder()  //Displaying order information
      {
  
  
  
  
  
  
  
      }
  
  
  
  
      // Main Method
      public static void main(String[] args)
      {   new PointOfSale(); }
  }
  </code></pre>
  
  <p>as you can see you can purchase orders in a neverending loop. but those orders arent stored so i cant call them. cause if you stop ordering, there should be a receipt of some sort. how can i store these multiple orders and display them on DisplayORder</p>