title: Passing arrays between methods and calling them in main
body: <p>I want to pass an array from one method to another and call that method on the array. However, it shows where <code>increaseCost()</code> is not applicable for arguments. How would I fix this code?</p>
  
  <p>I'm trying to pass <code>double[] price</code> to <code>increaseCost()</code>:</p>
  
  <pre><code>import java.util.*;
  public class LabQuiz3 {
      public static void main(String[] args) {
          initialize();
          increaseCost();
      }
      static void initialize() {
          String[] name=new String[10];
          System.out.println("Name of the grocery? ");
          Scanner scan=new Scanner(System.in);
          for (int i=0; i &lt; 10; i++) {
              String a = scan.next();
              name[i]=a;
          }
          scan.close();
          double[] price=new double[10];
          System.out.println("Price of each grocery? ");
          Scanner sc=new Scanner(System.in);
          for (int j=0; j &lt; 10; j++) {
              double b=sc.nextDouble();
              price[j]=b;
          }
          sc.close();
      }
      static void increaseCost(double[] price) {
          for (int c=0; c &lt;10; c++) {
              double k=price[c] * .07;
              price[c]=k;
          }
          System.out.println(price);
      }
  }
  </code></pre>