title: How do i multiply two one-dimensional arrays?
body: <p>I will be honest with you, I have absolutely no idea what i am doing, nor have the slightest of ideas where to look and it is my homework so if someone would be kind enough to help me out, I would be truly grateful.</p>
  
  <p>"Write a program that declares three arrays named price, qty, and amt.  Each  array should be declared in main()and capable of holding 3 values.  Make up numbers for price and qty (quantity).(ShoppingCart.java) (4 pts) Write a method to fill the amt array with the product of the corresponding elements in price and qty.  (3–create a method within the ShoppingCart class)"</p>
  
  <p>What i have attempted is just this:</p>
  
  <pre><code>public class Shoppingjava {
  
      public static void main(String[] args) {
  
          int price[] = {4, 9, 7};
          int qty[] = {2, 5, 3};
          int amt[] = new int[3];
  
          System.out.println(product(price, qty));
      }
  
      public product(int P[], int Q[]) {
          int[][] c = new int[P.length][Q.length];
          return product;
      }
  
  }
  </code></pre>
  
  <p>But i really don't know where to go with this, I am sorry to bother anyone with this and if it someone is willing to help me out, thank you.</p>